Preview Mermaid Diagrams On Mac
Press Space on a Markdown file and its diagrams are drawn, not shown as code
GitHub draws Mermaid diagrams; Quick Look on a Mac shows their source. spacebar draws them: put the diagram in a mermaid fence, select the file and press Space.
```mermaid
flowchart LR
Finder --> QuickLook[Quick Look] --> spacebar --> Preview
```
- OfflineMermaid is bundled; no network needed.
- Redraws on saveKeep it beside your editor.
- KaTeX math
$inline$and$$block$$. - Off switches
"mermaid": falseor"math": falsein settings.json.
A diagram that fails to draw shows the reason it failed.
Every File, Not Just Markdown
A free Quick Look replacement. With the optional Space helper, which needs Accessibility, Space opens PDFs, photos, CSV and nearly every other file in spacebar.
More: Markdown, Obsidian, Claude Code, QLMarkdown, compare.
Questions
Can Quick Look show Mermaid diagrams?
Not on its own: Apple’s Quick Look shows the diagram’s source. With spacebar, a mermaid fence in a Markdown file is drawn as a diagram when you press Space.
Does it need an internet connection?
No. Mermaid and KaTeX are bundled with spacebar, so diagrams and math draw offline.
What if a diagram doesn’t draw?
spacebar shows the reason it failed.
Does it redraw as I edit?
Yes. Each time the file is saved, the preview redraws and keeps your place.
Can I turn diagrams off?
Yes. "mermaid": false in settings.json turns diagrams off, and "math": false turns math off.
Install
Or paste this in Terminal
curl -fsSL https://spacebar.patebryant.com/install.sh | sh
Free and open source for macOS 13 or later. See it first: open architecture.md in the demo on the home page.