Preview HTML Files On Mac
See a page rendered without opening a browser: press Space on it with the Space helper, or pick it from spacebar’s sidebar
Quick Look never hands HTML to another app’s extension: macOS keeps Space on HTML for itself. With spacebar’s optional Space helper, it opens in spacebar instead, rendered with no scripts.
Without it, press Space on a folder, a Markdown file, a script, a config or a zip, and click the page in the sidebar.
Install It
Or paste this in Terminal
curl -fsSL https://spacebar.patebryant.com/install.sh | sh
The script downloads the latest notarized release from GitHub, checks its SHA-256 and installs to ~/Applications, no sudo. Read the script.
Preview A Page
.htmlSelect it (without the helper, its folder).- SpaceIt renders, scripts off; or the folder opens.
- ↑ ↓Move on to the next file.
⌘+, ⌘− and ⌘0 zoom the page in, out and back.
Scripts And Safety
Scripts run:
- On pages made on this Mac, such as a build report, once you choose Run for files made on this Mac in the bar above the page.
- That includes files from
git clone,curl,unzipor USB, which aren’t quarantined.
No scripts, no web loads:
- Until you answer that bar: the page opens without them.
- On downloads quarantined by browsers, Mail or AirDrop.
- Anywhere, with Settings › Advanced › Scripts in HTML files › Never.
- On pages opened through the Space helper, always.
The toolbar’s button reveals the page in Finder; spacebar never hands it to a browser.
Good For
- ReportsTests, coverage, docs builds, exported notes
- Agent outputPages a coding agent wrote, beside its plan
- Saved pagesChecked without running them
More: Quick Look a whole folder, Quick Look replacement, compare. Or try the demo.