How it works
The viewer scans your Markdown for fenced code blocks marked mermaid (and :::mermaid blocks used by Azure DevOps), renders each one, and shows the surrounding text so you can review the document as a whole.
Use cases
- Preview a README before pushing it to GitHub or GitLab.
- Review architecture decision records (ADRs) that contain diagrams.
- Check Obsidian or Notion exports that include Mermaid.
- Find and fix the one broken diagram in a long document.
Editing a diagram
Click Edit this diagram under any rendered block to open it in the full Mermaid live editor with AI fixing, themes and export. You can also import a Markdown file directly in the editor, which lets you pick which block to edit.
Learn how GitHub renders Mermaid in the Mermaid in GitHub Markdown guide.
This mermaid markdown viewer is for a document, not a lone diagram. Paste Markdown that contains ```mermaid fences and the page previews each diagram in place, with the surrounding text still visible. You can read a README the way a teammate will read it, before you push, and you can see which fence is the one that fails. The preview runs in your browser. The document is not uploaded for that render.
A fence is three backticks, then the word mermaid, then the diagram, then three backticks again. The info string has to be mermaid. A fence tagged text or js will not render, which is what you want for a sample you are showing as code. The Mermaid in Markdown guide is the short version of those rules, including where GitHub, GitLab, Notion, and Obsidian agree and where they do not.
What you are checking
You are checking three things at once. The diagram has to parse. The diagram has to make sense next to the paragraph above it. And a long file has to contain the fences you think it contains. A single-diagram editor hides the second and third. People fix a flowchart in isolation, paste it back, and only then notice the heading still describes the old flow, or that a second fence further down has been broken for a week.
Paste the whole note. Scroll. Read the prose, then the picture, then the prose. If they disagree, fix the cheaper one. Usually that is a sentence that survived an edit the diagram already absorbed. Sometimes it is a diagram that was copied from another doc and still says last quarter's service name.
flowchart TD
A[Paste the Markdown] --> B[Find each fence]
B --> C[Read the paragraph above it]
C --> D{Match?}
D -->|Yes| E[Leave it]
D -->|No| F[Edit the text or the diagram]That picture is itself the kind of fence this viewer is for. In a real file it would sit under a sentence that tells the reader what to do. The viewer lets you see both.
Fences, hosts, and version drift
GitHub renders mermaid fences in READMEs, issues, pull requests, and wikis. GitLab renders them in repository files and in merge requests. Obsidian renders them in a note. Notion uses a code block set to Mermaid. The fence is the same idea everywhere. The Mermaid build is not. A diagram that previews here can still fail on a host that pinned an older library, especially if you used a diagram type that shipped recently. When that happens, simplify, or export a PNG for that host and keep the source for everywhere else.
The PNG, SVG, and PDF converters are the escape hatch. They also run locally. Use them when the destination will not render Mermaid, not as a substitute for reading the Markdown. The export guide explains which file to pick. A README on GitHub usually needs no file. A slide does.
Two diagrams need two fences. Putting two diagram keywords in one fence is a parse error, not a layout. Close the first fence, write the paragraph between them, and open another. The viewer will show both, which is how you confirm you actually closed the first one. A missing closing fence swallows the rest of the document into the code block. The preview makes that obvious in a way a raw editor sometimes does not.
Fixing the one broken block
Long docs fail in one block and look fine everywhere else. The viewer is how you find it. The parser error points at a line. Common causes are a label with punctuation the syntax treats as syntax, a missing bracket, or a direction keyword that is not on the first line. Copy that fence into the editor if you want highlighting and AI Fix. You do not have to move the whole README. Fix the block, paste it back, and preview the file again so the paragraphs around it still fit.
AI Fix is optional and metered in the editor. The free allowance is 5 uses in total. You can also fix the line yourself. For a one-character mistake, fixing it yourself is faster. For a diagram you did not write, an explanation in the editor is often the faster way to learn what the arrows were supposed to mean. Either way, bring the corrected fence back to the Markdown file. The viewer is the check. The file is the record.
What this page will not pretend to be
It will not render every Markdown extension on earth. Tables, lists, and headings should stay readable so the diagram has context. Exotic embeds, scripts, and HTML you would not want a previewer to run are out of scope. It will not turn the document into a PDF of the whole note. Export the diagrams that need to be files, one at a time. It will not store the note. Refresh is a new paste unless the browser kept the field. If the text matters, it should already live in a repo or a note app. This page is a mirror you hold up to that file.
It is also not mermaid.live, and it is not the full editor. The playground is a single diagram with samples and share URLs. The editor adds saving, folders, and exports tied to your plan. The viewer is the in-between: many fences, one paste, no account. Use the playground to experiment with a snippet. Use the viewer to believe a document. Use the editor when the diagram graduates into something you will reopen by name.
Looking at a fence on this page does not spend an export. Downloads follow the same plans as the editor. Free PNG is 1× with a watermark. Starter unlocks PNG up to 4× with no watermark. SVG and PDF downloads are Pro, at $11.99 a month or $119.90 a year.
A short loop before you push
Open the README. Paste it here. Fix any fence that does not render. Read each diagram against the heading above it. Then push. If the host is GitHub, you have a good chance the same fences render there, with the caveat about newer diagram types. If the host is a static site with its own Mermaid plugin, check that site too. The viewer removes the failure of never reading the file as a file.
If the text is already written and you only need the picture, view mermaid diagrams online is that path.
Frequently asked questions
Which Markdown syntax is supported?
Fenced code blocks that start with ```mermaid or ~~~mermaid, plus :::mermaid blocks. Other Markdown is shown as simple formatted text.
Can I preview a README from a URL?
Yes — in the full editor use Import → From a URL and paste a GitHub file link. Multiple diagrams can be picked from a list.
Is my document uploaded?
No. Everything is rendered locally in your browser.
More converters
- Mermaid to PNG — Convert Mermaid to PNG in your browser.
- Mermaid to SVG — Convert Mermaid to SVG in your browser.
- Mermaid to PDF — Convert Mermaid to a vector PDF in your browser.
- AI diagram generator — create Mermaid diagrams from text.