Skip to content
AI-generated HTML

How to share AI-generated HTML as a live link

ChatGPT, Claude, Gemini, Copilot, Cursor, v0 and Bolt can all write a working web page. Here is how to get that code out of the chat and onto a real URL — including the multi-file projects and the errors AI code typically hides.

9 min readUpdated October 2026By the HTMLtoLink team
Short answer

Ask the assistant for one complete HTML file with the CSS and JavaScript inline, copy the whole code block, paste it into HTMLtoLink and press Get my link. Sign in with Google and you get a live URL anyone can open; paste a newer version later to update the same link.

Step 1: get a complete, single-file page from the AI

Assistants often answer with fragments ("add this to your CSS") or split code into several files. For sharing, one self-contained file is easiest. Use a prompt like:

Give me the complete page as ONE index.html file, with all CSS in a <style> tag
and all JavaScript in a <script> tag. Include the viewport meta tag.
Only use libraries from a public CDN over https. No placeholders like "rest of code here".

This works the same in ChatGPT (including canvas), Claude, Gemini, Copilot, DeepSeek, Mistral and Perplexity.

Step 2: copy all of it

Use the code block's own Copy button rather than selecting text — selection easily misses the last line. Check the code ends with </html>. If the answer was cut off mid-file, reply "continue from where you stopped" and stitch the two parts together, or ask for a shorter version.

Step 3: preview, then publish

  1. Paste the code into the publisher and tap Preview to make sure it renders.
  2. Give it an address (budget-calculator.htmltolink.dev) and press Get my link.
  3. Share the link or QR code. To change it, ask the AI for a fix, then use Update content in My links — the URL stays the same.
Turn your HTML into a link now
Paste code or drop a file, ZIP or folder. Free plan with Google sign-in, custom address & password.
Get a link

Multi-file projects: Cursor, v0, Bolt, Lovable, Replit

Code tools usually produce a project folder. Two cases:

  • Plain HTML/CSS/JS folder — zip the folder that contains index.html and upload the ZIP (or drop the folder). Every file is served at its path. See ZIP website to a link.
  • React, Vue, Svelte or Vite project — browsers cannot run the source directly. Run the build (npm run build) and upload the output folder, usually dist/ or build/. If the built page is blank, set the base path to relative (base: './' in vite.config) — or rely on HTMLtoLink's own subdomain, where / paths work.

Why the AI's page works in the chat preview but not online

SymptomUsual causeFix
Blank pageJavaScript error, often a missing closing bracket from a truncated answerOpen the browser console (F12); ask the AI to fix that error
No stylesCSS was in a separate style.css you did not uploadAsk for inline CSS, or upload the folder
Images missingPlaceholder paths like images/hero.jpgUse real https image URLs or embed with Base64
"React is not defined"JSX or imports with no build stepAsk for "plain JavaScript, no build step", or build the project
API calls failNeeds a secret API key, or the API blocks browsers (CORS)Never paste secret keys into a public page; use public APIs or a backend

The HTML checker spots the structural ones automatically.

Why not just share the AI's own preview?

Several assistants can show or share a preview of what they built. That is handy for a quick look, but the preview lives inside the assistant's product: you usually cannot choose the address, add a password, bundle extra files or keep editing the code you serve without going back through the chat. A hosted link is yours: one address you control and can update.

A word on safety

AI assistants sometimes put API keys, test credentials or personal data straight into the code they write. Anything in a published page can be read by anyone who opens it, so search the code for key, token and password before you publish — and see how private shared links really are.

Questions people ask

Can I publish ChatGPT HTML for free?

Yes. Copy the complete HTML from ChatGPT, paste it into HTMLtoLink, press Get my link and sign in with Google. The free plan keeps it online for 24 hours, and the link can be updated later.

How do I host a Claude artifact or Gemini canvas outside the app?

Copy the code from the artifact or canvas (or ask for it as a single HTML file), paste it into HTMLtoLink and publish. React artifacts need to be converted to plain HTML or built first.

Can an AI agent publish HTML automatically?

Yes — the HTMLtoLink API takes HTML in one POST request and returns the URL, so agents and scripts can hand a human a link.

The AI's code is cut off. What do I do?

Ask it to "continue exactly where you stopped", paste both parts together, and check that the file ends with </html>. Or ask for a shorter version with less CSS.

Read next

Your HTML deserves a real link

Paste code, drop a file, a ZIP or a whole folder — get a live URL with your own address, an optional password and a QR code. Free to start with Google sign-in; paid plans keep links online for good.

Turn HTML into a link