.webarchive
A .webarchive file is Safari's single-file saved web page: an Apple
property list that holds a page's HTML together with the images,
stylesheets, scripts and frames it loaded. Safari writes one when you
choose File → Save As… and set Format to Web Archive. Double-click
it on a Mac and the page reopens offline, exactly as it looked.
Everywhere else, it doesn't open at all.
What's inside
A web archive is a property list
— normally the binary bplist00 flavour — with a small, nested shape:
WebMainResource
WebResourceURL https://example.com/report/
WebResourceMIMEType text/html
WebResourceTextEncodingName UTF-8
WebResourceData <the HTML bytes>
WebSubresources
[ { WebResourceURL: …/style.css, WebResourceMIMEType: text/css, WebResourceData: … },
{ WebResourceURL: …/chart.png, WebResourceMIMEType: image/png, WebResourceData: … } ]
WebSubframeArchives
[ <a nested web archive per iframe> ]
When Safari reopens it, WebKit renders WebMainResource and answers each
request for style.css or chart.png from the matching subresource,
keyed by its original URL. You can look inside one yourself on a Mac:
plutil -convert xml1 -o - page.webarchive | head -40
Where it opens
| Opened on / in | Result |
|---|---|
| Safari on a Mac | Renders |
| Chrome, Edge, Firefox (any OS) | Downloaded or shown as unreadable data |
| Windows | No built-in app |
| Android, Chromebook | No built-in app |
| iPhone / iPad | Not reliably — don't count on it |
| Served from a website | Downloaded, not rendered |
So a .webarchive is good for one thing — you, on your own Mac, keeping a
page offline — and bad for sharing. The person you send it to on Windows
or a phone gets a file they can't read.
.webarchive vs MHTML vs self-contained HTML
.webarchive |
MHTML | Self-contained HTML | |
|---|---|---|---|
| Container | Apple plist | MIME multipart | Plain HTML |
| Made by | Safari | Chrome, Edge, Word | Exporters, inliners |
| Opens in | Safari only | Chrome / Edge desktop | Every browser |
| Phones | No | No | Yes |
| Can be hosted at a URL | No | No | Yes |
Both archive formats chase the same goal — one file, nothing missing — and
each only works inside its own browser family. A self-contained HTML file
reaches it portably: CSS in <style>, scripts in <script>, images and
fonts as data URIs.
Converting a .webarchive to HTML
Quick, on a Mac — text and layout only:
textutil -convert html page.webarchive
This writes page.html with the text, links, tables and basic styling.
Scripts and anything interactive are dropped — fine for an article,
useless for an interactive test or coverage report.
Faithful copy:
- Open the original page (or the
.webarchivein Safari, then the live URL it came from) in Chrome or Edge. - Save as → Webpage, Complete. You get
page.htmlpluspage_files/. - Drop both into the free HTML inliner to fold
them into one portable
.html.
Or don't send a file at all. Drop the HTML — or the whole report folder — into Comma and send the link. It opens in any browser on any device, scripts still run in a sandboxed iframe, and readers can comment on the exact line they mean.
Try it
Comma is free — unlimited reports, unlimited commenters, unlimited revision history.
Related
- MHTML — the Chrome/Edge equivalent, and where it fails
- Self-contained HTML · Data URI
- HTML inliner — fold a report folder into one file
- Open an HTML file on iPhone · iPad · Android · Chromebook