Guide

How to open an HTML file on iPhone

Tapping a .html file in Files gives you a preview, not a working page. Here is why, the two ways that work in Safari, what to do with a file from ChatGPT, and the same fix for Android.

Updated 2026-11-07 · by Hostus Team

Someone sent you a .html file, or ChatGPT made you one. On a computer you double-click it and a browser opens it. On an iPhone you tap it and get a preview, a wall of code, or nothing that moves.

The short answer: an iPhone opens web pages from a web address, not from a file. Give the file an address and it works in Safari like any site. The quickest way is to publish it on Hostus: you get a link that opens on any phone, and you can send it to someone else. For a quick private look, the free HTML viewer runs the file in Safari without uploading it. Apple facts on this page come from Apple's iPhone User Guide, read on 7 November 2026.

Why tapping the file doesn't open it like a web page

Apple's guide to finding and viewing files in Files says that when you haven't installed the app that created a file, "a preview of the file opens in Quick Look." That is what happens to a .html file. Apple describes Quick Look as a way to preview an image or a PDF. It is a preview, not a browser, and Apple doesn't promise that a page's scripts run there.

So a page with buttons, a quiz, a game or a chart usually sits still. A report on Apple's developer forums adds that the Files app shows only the text and the styles inside the file, and fails to load images and other files next to it.

Safari and Chrome on iPhone don't have the File, Open menu that browsers have on a computer. They open addresses. The same guide says you can touch and hold a file and choose Open With, but which apps appear depends on what you have installed, and Apple says nothing about browsers for HTML. If one shows up, try it. If not, use one of the two routes below.

This is the route we recommend, because the page works fully and you can send it. Everything happens on the phone.

  1. Open hostus.io in Safari.
  2. Tap the upload area and pick your .html file in Files.
  3. Type your email. Open the sign-in link we send you, in Mail on the same phone.
  4. Your page is waiting in the dashboard. It starts private: switch it to public if other people should open it.
  5. Tap the link. It opens in Safari as a normal web page, at your-page.hostus.page, with scripts, forms and games working.
  6. To send it, copy the link into Messages or WhatsApp. The person on the other end needs no app and no account.

The upload from the homepage takes files up to 1 MB. For a bigger file, sign in first and upload it from your dashboard. If you fix the file later, upload the new one to the same page: the link stays the same.

Route 2: a quick look with the HTML viewer

If you only want to see the page yourself, the HTML viewer does it in Safari or Chrome with nothing uploaded.

  1. Open hostus.io/tools/html-viewer on the iPhone.
  2. Tap Open file and pick the file in Files. Or paste the code if you have it as text.
  3. Switch to the Preview tab.

Scripts run, so buttons, quizzes and charts work. Two limits: images saved as separate files next to the HTML don't load, and nothing you type in the page is saved. When it looks right, the viewer can turn it into a link, which is route 1.

Open an HTML file from ChatGPT on iPhone

ChatGPT hands you a page in one of two shapes: a file to download, or code in a code block. Either way, Quick Look won't run it.

  • Code in a code block: tap copy, open the HTML viewer, paste, and switch to Preview. This is the fastest way to see what ChatGPT built.
  • A file: save it to Files, then use route 1 or route 2.
  • Skip the file entirely: connect Hostus to ChatGPT and say publish it on Hostus. ChatGPT answers with a link, which you tap and open in Safari. Connect once on ChatGPT on the web: OpenAI says custom MCP servers can't be connected on mobile. The steps, and the plans that allow it, are in how to share a game made with ChatGPT.

Claude works the same way. Add Hostus as a custom connector at https://app.hostus.io/api/mcp. Anthropic's article on custom connectors says they work on every plan, with one custom connector on Free, and that the connection runs from Anthropic's cloud on every Claude client, the mobile apps included.

Safari or Chrome on iPhone?

For a link, it makes no difference. A hostus.page link opens the same in Safari, Chrome or any other browser on the phone, and you can add it to the Home Screen like any site.

For a file saved on the phone, neither browser has an open-file menu. In Files, touch and hold the file, tap Open With, and see if your browser is listed. If it isn't, publish the file or use the viewer.

Open an HTML file on Android

Android is looser than iPhone. Tap the file in your Files or Downloads app, and you are often offered Open with and a browser such as Chrome. What you get varies by phone maker and by file app, and we found no Google help page that describes it. A common problem is the same as on iPhone: the page opens, but images and scripts saved as separate files next to it don't load.

The fixes are the same too. Open the HTML viewer in Chrome for a quick look, or publish the file on Hostus and open the link. A link behaves the same on Android, iPhone and a computer, so it is also the way to send the page to someone whose phone you don't know.

Which way should you use?

WayScripts runImages next to the fileCan you send itNeeds
Publish on Hostus, open the linkYesYes, uploaded with the page from your dashboardYes, one link for any phoneYour email
Hostus HTML viewerYesNoNot until you turn it into a linkNothing
Tap the file in Files (Quick Look)Not promised by AppleReported not to loadOnly by sending the file, which has the same problemNothing
An HTML viewer app from the App StoreDepends on the appDepends on the appNoInstalling an app

Pick a viewer app if you open local HTML files every day and never send them. For a page you want to use or share, publish it.

Good to know before you publish

Every page shows a small "Published with Hostus" badge in a corner. The link is your-page.hostus.page, and you can't point a domain of yours at it. Pages don't appear in Google, so people reach them from your link. A new page starts private, and making it public is a switch in the dashboard. The free plan covers 20 pages and 2 MB in total, images and media included. One HTML upload can be up to 4.5 MB on a paid plan, and the homepage takes 1 MB without an account. Hostus keeps the last 20 versions of each page. If the file has a secret key in it, the upload stops and warns you.

Questions people ask

How do I open an HTML file on my iPhone?

Give it a web address. Upload it on hostus.io from Safari, then open the link, and it runs like any website. For a private look with nothing uploaded, open the Hostus HTML viewer in Safari and pick the file with Open file.

Why does my HTML file show code or a blank preview on iPhone?

The Files app opens it in Quick Look, which is a preview, not a browser. Apple doesn't promise that scripts run there, so interactive pages sit still and images saved next to the file don't load.

Can Safari open a local HTML file on iPhone?

Not through a menu. Safari on iPhone has no File, Open. In Files you can touch and hold the file and try Open With, but Apple doesn't promise a browser will be listed. Publishing the file gives Safari an address it can open.

How do I open an HTML file from ChatGPT on my iPhone?

If it is code, copy it and paste it into the Hostus HTML viewer, then tap Preview. If it is a file, save it to Files and upload it on hostus.io. With the Hostus connector, ChatGPT gives you a link instead of a file.

How do I open an HTML file on Android?

Tap it in your Files or Downloads app and choose Open with, then Chrome, if your phone offers it. If images or scripts don't load, publish the file on Hostus and open the link instead.

Does the person I send the page to need an app or an account?

No. Once the page is public, the link opens in any phone browser. You only need an account to publish.

Turn the file into a link your phone can open

Free plan, no card. Upload from Safari and open the page in seconds.