Skip to content

Guide · ChatGPT

Publish ChatGPT HTML as a website

You asked ChatGPT for a website and it handed you a wall of code. It works when you open it on your computer, but nobody else can see it. Here's the shortest path from that code to a real link like my-portfolio.flatpage.page, with HTTPS, that you can text to anyone.

From chat to live site in three steps

  1. Copy the code

    Click Copy on ChatGPT's code block. If it gave you several blocks, ask it to merge them into one file first.
  2. Paste it, or save as index.html

    Paste into the box on your dashboard, or save it as index.html and drag the file in.
  3. Open your link

    Your page is live in seconds. Send the link, print the QR code, or keep editing and replace it.

Getting a clean file out of ChatGPT

Ask for exactly what you need

A prompt that works well: “Give me the complete page as a single file called index.html, with all CSS and JavaScript inline, no placeholders, ready to upload.” That avoids half-finished snippets and “add your styles here” comments.

Saving as index.html on any computer

On Windows, open Notepad, paste the code, choose File → Save As, set “Save as type” to All files and name it index.html. On a Mac, TextEdit needs Format → Make Plain Text first, then save as index.html. If your computer adds .txt to the end, rename it. Or skip all of this and paste into the box.

Using Canvas or a multi-page site

If you built the page in ChatGPT's Canvas, copy the code from there the same way. For several pages, ask ChatGPT for each file (index.html, about.html, contact.html) with links between them, put them in one folder with any images, and upload the folder as a zip.index.html becomes the home page.

Placeholder images

ChatGPT likes to invent image paths such as images/team.jpg. If you don't upload those files, visitors see a clean placeholder box rather than a broken image, so the page still looks intentional while you find real photos.

Changing it later

Go back to the same ChatGPT conversation, ask for the change, and paste the new version over the old one. The link doesn't change, and each version is kept as its own immutable snapshot.

Questions

ChatGPT gave me HTML, CSS and JavaScript in separate blocks. What do I do?
Either ask ChatGPT to combine them into one index.html with the CSS in a <style> tag and the JavaScript in a <script> tag, or save them as index.html, style.css and script.js in one folder and upload the folder as a zip.
Do I need a text editor?
No. You can paste the HTML straight into the box on your dashboard. Saving a file is only needed if you want to keep a copy or include images.
My page has a contact form. Will it work?
The page is published as static files, so there's no server to receive form posts. Use a form service that gives you an action URL, or a mailto: link. Pages that ask for passwords or card numbers are held for review on the free plan.
Can I use my own domain?
Yes, on Starter or Plus. Your site keeps its free link too, so nothing you've already shared breaks.
How big can the page be?
Up to 10 MB on the free plan, 100 MB on Starter and 500 MB on Plus. A typical ChatGPT page is a few kilobytes.

Your ChatGPT page, live in a minute

Paste the HTML and share the link. The free plan includes one site and an HTTPS link.