AI-generated HTML
How do I open a ChatGPT HTML file on iPhone?
Ask ChatGPT for a downloadable .html file, save it to Files, then open it in HTML Keep so the page runs with working CSS and JavaScript on your iPhone.
Short answer
To open a ChatGPT HTML file on iPhone, first get the code as an actual .html file, usually by asking ChatGPT for a downloadable file. Save it to the Files app, then share it to HTML Keep. The page opens with its layout, styles and JavaScript working, and stays in your library.
Code block or file: the part that trips people up
ChatGPT often answers with HTML inside a code block in the chat. That text is the recipe for a page, not the page itself, and your iPhone has no built-in place to paste it and see the result.
ChatGPT can often produce a downloadable file when you ask for one, and in some views its canvas can preview code. A preview inside the chat is handy for a look, but to keep the page and open it later you need it saved as a .html file.
Common examples are a tip calculator, a packing checklist, a workout timer or a small quiz for your kids. They are useful for weeks, not just for one chat.
Getting a real .html file out of ChatGPT
The simplest request is direct: "Please give me this as a single downloadable .html file." Asking for everything in one file, with CSS in a style tag and JavaScript in a script tag, also avoids missing pieces later.
Look for the download link or file attachment in the reply. The exact wording and buttons vary between app versions, so if you don't see a file, ask again more explicitly.
- If ChatGPT only gives a code block, one fallback is to copy the code on a computer, save it as page.html in a text editor, and AirDrop it to your iPhone.
- If the project has several files, ask for them as one ZIP archive so they stay together.
- Give the file a clear name, such as workout-timer.html, so it is easy to recognize later.
Open it on your iPhone
- Install HTML Keep from the App Store (download page).
- In ChatGPT, tap the downloaded file. If a preview appears, use the Share button and choose Save to Files.
- Open the Files app, touch and hold the .html file, tap Share, and choose HTML Keep. Some versions let you share straight from ChatGPT without saving first.
- The page opens as a working web page. Buttons, animations, calculators and forms run with Apple's WebKit engine.
- Next time, open it from your library instead of scrolling back through the chat.
When the page doesn't behave
- Shows plain code or does nothing when tapped in Files: that is Quick Look's limited preview. Open it in the viewer instead.
- Blank sections or broken layout: the page may reference separate files like style.css or app.js that weren't included. Ask ChatGPT to inline them into one file, or send the folder as a ZIP.
- Icons, fonts or charts missing offline: many generated pages load libraries from a CDN, which needs an internet connection.
- Buttons fail or nothing happens: the code itself may have a bug. The viewer shows the page as written and doesn't fix code, so describe the problem to ChatGPT and import the corrected file.
- Layout too wide for the screen: ask ChatGPT to make the page responsive for a phone-sized screen.
Updating the page after another round of edits
AI pages tend to go through several versions. When ChatGPT gives you a revised file with the same name, open it again and choose to update the existing project. The previous version is kept as a backup, or you can import it as a new project instead.
If you want the page one tap away, add it as a Home Screen widget or shortcut. More ideas are in viewing AI-generated HTML on your phone.
Frequently asked questions
Can I paste ChatGPT's code directly into the app?
No. HTML Keep opens files; it doesn't create pages from pasted text. Get the code as an .html file first.
Will the page keep data I enter?
If the page saves to localStorage, as many to-do lists and trackers do, that data stays with the project and is there the next time you open it.
Do I need to publish the page to share it?
Not necessarily. You can share the file itself from the app. If you want a public link, read whether you need to deploy an AI-generated page.
Does this work for pages from other assistants?
Yes. Any assistant that gives you an .html file works the same way. For Claude, see opening a Claude HTML artifact on iPhone.