How to Open an HTML File from ChatGPT or Claude on iPhone
Updated 2026-08-09
You asked ChatGPT, Claude or Gemini for a web page, a report or an interactive chart, and got an .html file — but tapping it on your iPhone shows raw code, a text-only preview, or nothing at all. That's not your fault: iOS has no built-in app that properly renders local HTML.
The fix takes under a minute: open the file in a dedicated HTML viewer. Here is the complete workflow, including what to do when the page opens but looks wrong.
Why iPhone can't open it out of the box
The Files app preview renders HTML in a restricted mode: external stylesheets are ignored, JavaScript never runs, and linked resources don't load. Safari, meanwhile, is built for URLs — getting a local file into it with all its assets intact is unreliable. So an AI-generated dashboard that looks great in the chat becomes a wall of unstyled text on your phone.
Option 1 — Share the file to an HTML viewer
- Download OpenHTML (free) — a private, on-device viewer for HTML, Markdown and web projects.
- In ChatGPT/Claude, Files, Mail or any chat app, tap the Share button on the .html file.
- Choose OpenHTML. The page opens rendered — styles applied, local JavaScript running.
If OpenHTML doesn't appear in the share sheet, swipe the app row, tap More, and select it there once — iOS remembers it afterwards.
Option 2 — Paste the code directly
Often the AI gives you a code block, not a file. You don't need to save it to Files first: copy the code, open OpenHTML, and choose Paste HTML. The pasted code becomes a rendered page immediately, and you can keep it in your library like any imported file.
Option 3 — Open once from Files
If the file is already in iCloud Drive or On My iPhone, use “Open from Files” inside OpenHTML to read it once without importing — nothing is added to your library unless you choose to save it. Useful for files you only need to glance at.
When the page opens but looks broken
AI-generated pages commonly reference things that aren't there: a CSS framework on a CDN, a chart library loaded over the network, an image file the AI mentioned but never produced. The page isn't corrupt — it's incomplete, and a normal viewer can't tell you which part.
- OpenHTML's diagnostics list every missing file and blocked remote resource by name, plus JavaScript errors from the console.
- If the page genuinely needs its CDN (fonts, frameworks), allow network access for that one document — the default keeps every page offline.
- If the AI split the page into several files, import them together as a folder or ZIP so relative paths keep working — see running ZIP web projects.
For a deeper look at the failure modes, read why your HTML file looks broken in iOS preview.
Privacy: what happens to the file
AI outputs often contain your own data — reports, tables, drafts. OpenHTML keeps everything on device: imported files live in the app's private storage, there are no accounts or analytics, and pages can't reach the network unless you allow it per document. Nothing is uploaded, ever.
Beyond viewing
- Markdown answers with formulas render offline too — see Markdown + LaTeX on iPhone.
- Need to send the result to someone? Export the rendered page as a full-length PDF or long image (Pro).
- Debugging a page the AI got almost right? The element inspector and network panel work right on the phone — see debugging web pages on iPhone.
Free on the App Store — core viewing needs no purchase.
Download OpenHTML