# Someone Sent Me an HTML File — How Do I Open It?

Canonical: https://commareports.com/open-html-file-online
Published: 2026-08-25

> An .html file that opens blank, loses its styling, or won't open at all on a phone. Why local HTML files break, what to try first, and how to turn the file into a link anyone can open.

# Someone sent me an HTML file

It's a test report, a notebook export, a coverage summary or a dashboard
someone generated. It's sitting in your downloads folder as
`report.html`, and one of three things happens.

## It opens, but it's blank or half-styled

The most common cause is that the file was never one file. `nbconvert`,
`genhtml`, Playwright, Gatling, Sphinx and most of the tools that emit
"an HTML report" actually emit a **directory** — `index.html` plus a
sibling folder of CSS, JavaScript and JSON. Send only the `.html` and
every one of those references resolves to nothing.

The second cause is the browser doing exactly what it should. A page
opened from `file://` has an opaque origin, so:

- `fetch()` and `XMLHttpRequest` to a neighbouring file are blocked.
- `<script type="module">` won't load — module fetches follow CORS rules
  even locally.

Reports that load their results as JSON — Vitest's HTML reporter is the
best-known example — are structurally unopenable this way. Their own docs
tell you to run a local web server first.

## It won't open at all on a phone

Mail clients on iOS and Android don't hand `.html` to the browser. You
get a preview of the markup as plain text, or a download that lands
somewhere you can't reach. There's no setting to fix this — the file
needs to be at a URL.

## It opens, and now you have a copy nobody else has

Even when it works, you've got a private artifact. Anyone who wants to
look at the same numbers needs their own copy of the same file, and there
is no way to say "the chart in section 3 is wrong" other than a
screenshot with an arrow drawn on it.

## The fix: give the file a URL

Drag the file — or the whole output folder, or a zip of it — into
[Comma](https://commareports.com/):

- `index.html` becomes the report body.
- Every asset that came with it uploads alongside, and the relative
  references are rewritten to the uploaded copies. That's the step
  `file://` can't do.
- Scripts still run, inside a sandboxed iframe (`allow-scripts`, no
  `allow-same-origin`), so interactive reports stay interactive. See
  [interactive HTML reports](/interactive-html-reports).

You get one URL. It opens on a laptop, on a phone, and for the person
who doesn't have the file.

## Who can see it

You pick, per report: private to you, your team, anyone signed in, or
anyone with the link — with view, comment or edit rights for link
holders. Full model in [sharing & access control](/docs/sharing).

If the file came from outside your company and you're not sure what's in
it, that decision matters more than usual — keep it private.

## Then: comment instead of screenshot

Once it's a URL, feedback lands on the report itself. Select the number,
leave a thread, and it stays anchored there across refreshes — see
[commenting on HTML](/comment-on-html).

## Try it

Comma is free — unlimited reports, unlimited commenters, unlimited
revision history.

**[Open your HTML file as a link →](https://commareports.com/)**

### Related

- [Why the report lost its CSS](/html-report-broken-css) — the styling case in detail
- [Email an HTML report](/email-html-report) · [Share an HTML report](/share-html-report)
- [Stop screenshotting reports](/stop-screenshotting-reports)
