iPhone and iPad

Open an HTML file on iPhone.

iOS does not include a general local HTML viewer. HTML Lens is built to open the file, render the page, show the source, and keep the document on your device.

No accountLocal-firstNo HTML Lens uploadsFree web tool

Why tapping the file usually fails

Safari renders URLs, while Files relies on Quick Look for previews. A local HTML file can land between those systems without a built-in rendered preview.

From the Files app

Use Open In or the share sheet to send a .html or .htm file to a compatible app.

From Mail or Messages

Open the attachment through the share sheet when a normal preview is unavailable.

From an AI chat

Copy the full HTML and paste it into the free web tool or the native app.

Offline and local

Self-contained documents can render without uploading the file.

What you actually need

To render a local HTML file on iOS, use an app that registers for HTML documents and displays them in a WebView. If you only need to inspect the code, a text editor can open it as text, but it will not show the finished webpage.

How it works

01

Get the file

Save the .html attachment to Files or copy the HTML from the place that created it.

02

Open with HTML Lens

Choose HTML Lens from the share sheet, or paste into the free web version.

03

Render and export

See the page, inspect its source, and export it in the format you need.

Common questions

Why does Safari not open my local HTML file?

Safari on iPhone is designed around web addresses and does not provide a normal File menu for opening arbitrary local HTML documents from Files.

Can I view the source instead?

Yes. A text editor can show a local HTML file as code. HTML Lens lets you move between source and the rendered page.

Does the file have to be uploaded?

No. HTML Lens is local-first and does not upload your document to an HTML Lens server.

What if the page looks different on my phone?

Responsive CSS, missing remote resources, or a missing viewport declaration can change how a page renders at phone width.