Opening an HTML file someone sent you on WhatsApp
A colleague drops report.html into the chat. On a laptop it would open
in a browser. On a phone you get one of these:
- WhatsApp says it can't open the file, or nothing happens.
- It opens as raw code — tags, brackets, no page.
- It opens, but it's blank or completely unstyled.
WhatsApp doesn't render HTML itself. It hands the file to another app,
and what happens next depends on your phone and on what the file
actually is.
On Android
Tap the document in the chat to download it, then tap it again.
Android asks which app to use. Pick Chrome or Samsung
Internet — not a text editor, and not a bare "HTML Viewer", which
shows simple markup and usually ignores scripts.
No browser offered, or it opens straight into the wrong app? Open
your file manager (Files by Google, or My Files on Samsung) and go to
the WhatsApp documents folder:
- Android 11 and later:
Android › media › com.whatsapp › WhatsApp › Media › WhatsApp Documents
- Older Android:
WhatsApp › Media › WhatsApp Documents
Long-press the file → Open with → choose the browser.
If a wrong app keeps grabbing it, clear its default under
Settings → Apps → that app → Open by default.
Full walkthrough, including the content:// problem below:
open an HTML file on Android.
On iPhone
- Tap the document. WhatsApp shows it in its built-in document
preview — the same Quick Look previewer the Files app uses. A simple
page often renders right there.
- For more room, tap Share → Save to Files, then open it from the
Files app.
That's as far as it goes. iOS has no way to open a local .html file as
a normal Safari tab, so you're always in a previewer. Pages that rely on
scripts, separate files or data fetched at view time may stay partly or
completely blank. More detail: open an HTML file on iPhone.
Or open it right here
Use the box on this page: pick the file you saved from WhatsApp, and it
renders in your browser. On Android, the file picker can reach the
WhatsApp Documents folder; on iPhone, save it to Files first. Nothing is
published unless you ask for a link.
Why it opens blank: it was never one file
Most "HTML reports" are really a folder: index.html plus css/,
js/, images and data files. Playwright and Allure test reports, coverage
reports, Jupyter and Sphinx exports, and any page saved from a browser
with Save page as (which writes a _files folder next to the .html)
all work this way. WhatsApp sends the one file you attached. Every
reference inside it now points at something that isn't on your phone.
A zip doesn't rescue it on a phone. Android opens local files through a
content:// handle to one file, so the page can't load the files
next to it even after unzipping. The iPhone previewer shows one file at a
time. And reports that load their data with fetch() are blocked from
reading local files on any device.
Nothing you change on the phone fixes this. The page has to be at a web
address.
The fix: ask for a link, not a file
Whoever has the report on a computer drags the file — or the whole
output folder, or a zip — into Comma and
pastes the link into the chat instead:
index.html becomes the page, the CSS, scripts, images and data upload
alongside it, and relative references point at the uploaded copies.
- It opens in Chrome or Safari like any website, with charts and filters
working. Nothing to download, save, or unzip.
- Everyone in the group opens the same page, and can comment on a
specific number instead of sending screenshots back.
If you're the one sending it
An .html attachment costs every recipient those steps on a phone and
often still fails. Send a link the first time. If it has to be a file,
the HTML inliner packs a folder into one
self-contained .html that at least opens offline.
Is it safe to open?
Be careful with .html files you didn't expect. An HTML attachment is a
long-standing way to deliver a fake sign-in page: it opens on your
phone, looks exactly like your bank or email login, and sends whatever
you type to someone else. If a file arrives out of the blue, check with
the sender, and never enter a password into a page that came as an
attachment.
Comma renders uploaded HTML inside a sandboxed iframe with no access to
your session, cookies or storage. That limits what a page can do to you;
it is not a malware scanner.
Try it
Comma is free — unlimited reports, unlimited commenters, unlimited
revision history.
Turn the file into a link →
Related