How to Share Claude HTML Artifacts as a Live Preview URL
A developer shares a workflow for turning Claude-generated HTML artifacts into live preview URLs. The approach covers single-file uploads, CLI deployment, and integration with agentic coding tools, emphasizing that only browser-ready files should be published.
Claude is surprisingly good at producing useful HTML artifacts: quick dashboards, landing page mockups, product one-pagers, data reports, UI prototypes, and internal tools. The awkward part usually comes after the HTML is generated. You want to send it to someone, but the artifact lives in a chat, a local file, or a temporary preview. Screenshots lose interactivity. Copying code into a message is hard to review. Asking someone to download a file and open it locally adds friction. For many small HTML outputs, the missing step is simple: Turn the generated HTML into a real browser URL. This article walks through a practical workflow for sharing Claude HTML artifacts as live previews. If you want a focused version of this workflow, I also wrote a short guide here: Share Claude HTML artifacts as a live URL https://previewship.com/guides/share-claude-html-artifacts . When Claude generates HTML, you usually get one of three things: These are not the same deployment target. A single HTML file can often be published directly. A static folder can be hosted as-is if it already contains the final assets. A source project usually needs a build command first. The most common mistake is trying to share the source project instead of the built artifact. For example, this is usually not what you want to publish: my-demo/ package.json src/ node modules/ vite.config.ts This is much closer to what you want: dist/ index.html assets/ app.css app.js That distinction matters because a browser can load index.html , CSS, JavaScript, images, and static assets. It cannot run your local build system for the viewer. A good preview workflow for AI-generated HTML should be boring in the best possible way: That workflow works especially well for: If Claude generated one self-contained HTML file, the fastest path is to paste or upload the file and get a live URL. This works best when the file includes everything it needs: < doctype html