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

  • Free and open source
  • macOS 13+
landing-page.html
The demo’s landing-page.html, rendered in the pane: drawn in HTML, not a screenshot.

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

Download for Mac

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

  1. .htmlSelect it (without the helper, its folder).
  2. SpaceIt renders, scripts off; or the folder opens.
  3. ↑ ↓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, unzip or 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

More: Quick Look a whole folder, Quick Look replacement, compare. Or try the demo.