Why iOS will not open an .html file, what actually happens when you tap one, and every method for viewing, editing, and exporting HTML on iOS, with the honest limits of each.
Last updated 22 August 2026
iOS has no system-level HTML viewer. Quick Look, the framework that previews files across Mail, Messages, and Files, does not support HTML. Safari renders HTML but is a URL browser, not a file handler. Nothing in the operating system bridges the gap.
This surprises people because iOS previews almost everything else. Quick Look handles PDF, JPEG, PNG, HEIC, Word, Excel, PowerPoint, Pages, Numbers, Keynote, plain text, RTF, CSV, ZIP contents, and a long list of audio and video formats. HTML is a conspicuous omission.
The reason is architectural rather than accidental. Rendering HTML means running a web engine, which means executing JavaScript, loading remote resources, and handling a full security surface. Quick Look is designed to display documents inertly, inside other apps' processes, without that risk. Apple's answer was to keep web rendering inside WKWebView, where apps opt into it deliberately and the system can sandbox it, rather than inside a general-purpose preview framework.
The practical consequence is that viewing a local HTML file on iOS requires an app that declares itself a handler for the public.html file type and renders the file in its own WKWebView.
The behavior differs by app, and none of it is a rendered page:
| Where | What happens |
|---|---|
| Mail attachment | Opens a share sheet instead of a preview, because Quick Look has nothing to hand it to. |
| Files app | Shows a blank preview, or the raw source as unformatted plain text. |
| Messages | Shows a generic document icon. Tapping opens the share sheet. |
| Safari download | Saves to Files. Tapping it from the downloads list returns you to the Files behavior above. |
| iCloud Drive | Same as Files. Syncing the file does not make it viewable. |
If an app that handles HTML is installed, it appears in the share sheet under Open In, which is the route every solution below ultimately uses.
There are four, and each has a genuine trade-off.
Works, costs nothing, and requires a computer. Reasonable if you are near one and the file is not urgent. Not a solution on a phone.
Services that host a file and give you a URL let Safari render it, since Safari can navigate to a URL even though it cannot open a local file. The trade-off is real: your document is now on someone else's server, which may be unacceptable for anything containing client work, financial data, or unreleased product designs.
Any text editor will show you the source. It will not render the page. Useful for checking a value or reading structure, useless for seeing what the page actually looks like.
An app registered as an .html handler renders the file in WKWebView on the device. Nothing is uploaded, it works offline, and the page displays as authored. This is what HTML Lens does, and there are other apps in the category. When comparing them, the questions worth asking are whether the app uploads anything, whether it is a one-time purchase or a subscription, and whether it can export what it renders.
iOS Safari has no View Source command and no developer tools. To read the source of a live webpage:
Ctrl + U on Windows, Cmd + Option + U on Mac.For a local file, any text editor shows the source. Editing it and seeing the result requires something that renders, which returns to the previous section.
Three causes account for nearly every case.
A phone renders at roughly 390 points wide. A desktop browser renders at 1280 or more. Any responsive breakpoint in the page produces a different layout at those two widths. The page is not broken. It is doing exactly what it was written to do at that width.
This matters when handing a screenshot to an AI coding tool as a visual reference: a capture taken at iPad width shows a layout that does not exist on phone, so the tool matches against the wrong thing.
If a page loads fonts, stylesheets, or images from the internet and the device is offline or blocking those requests, the page renders unstyled. Check whether the file references anything it did not come with.
Garbled text or scattered replacement characters mean the file's encoding was guessed wrong. Adding <meta charset="UTF-8"> inside the document head fixes almost every instance.
Converting HTML to PDF or an image requires something that lays the page out first. Two details are commonly missed:
A <details> element that is closed, or content hidden with display:none, will not appear in the output. If the document uses them, they need to be forced open before capture or the export will be incomplete in ways that are easy not to notice.
A page with CSS animations captures mid-frame, producing an export with elements at partial opacity or offset position. Setting all animation and transition durations to zero before capture avoids it.
Page size matters for PDF specifically. Letter and A4 paginate the document across pages; continuous produces one long page, which suits documents written for screen rather than print.
A large share of HTML now reaching phones comes from ChatGPT, Claude, Gemini, or Cursor rather than from a website. It has a distinct profile worth knowing.
When asking an AI coding tool to modify a page, giving it both the rendered image and the source is substantially more effective than giving it either alone. The source tells it what exists; the image tells it what the result looks like. For the image to be useful it should be captured at the target width, with collapsed content expanded and animations frozen, and with no device frame around it, since bezels and notches are pixels the model must work out are not part of the design.
HTML files often contain more than they appear to. A page exported from an internal tool, a client deliverable, an unreleased design, or a financial model is a document, and where it goes matters.
Any method that involves uploading the file, whether to a hosting service, an online converter, or a cloud renderer, means a copy exists on a server you do not control. For a throwaway page that is fine. For anything confidential it is worth asking about deliberately.
Local rendering avoids the question entirely, since the file never leaves the device. A simple way to verify any app's claim: turn on airplane mode. If it still works, nothing is being uploaded.
public.html.