Check a Mermaid diagram without rendering it: what stops it rendering, what only looks wrong, and which line each problem is actually on.
Waiting for a diagram
Paste Mermaid source, or load one of the examples.
A lower-case end closes a subgraph, so a flowchart node called end — or one labelled End without quotes — breaks everything after it. That is the single most common way a working diagram stops working, and Mermaid reports it as a parse error on whichever line it eventually gave up on.
Paste a diagram to find out whether it renders, and on which line the real mistake is.
This is a static check, not Mermaid’s parser: it reads the source and reports what is known to break or to render oddly, so a diagram that passes here can still fail on a construct this does not know about, and one flagged here may render on a version with looser rules. Nothing is executed — an init directive and front matter are read as text and no diagram library is loaded. The findings separate what stops it rendering from what merely looks wrong, because Mermaid’s own message does not.
Mermaid Syntax Inspector runs entirely on your device — your diagram is parsed in your browser and never rendered, executed or uploaded.
You’re on the Free plan. Compare plans
The problem this solves is the one Mermaid's own error reporting creates. Several of its syntax mistakes make the parser keep reading — an unclosed bracket, an unterminated init directive, a stray lower-case end — so the line it blames is wherever it finally gave up, which can be dozens of lines past the real mistake. On GitHub the whole block is replaced with a parse error and no line at all.
Findings separate what stops it rendering from what merely looks wrong. Those are different problems with different urgency, and lumping them together is why diagram linting gets ignored — a list where a cosmetic note sits beside a fatal error trains people to skim both.
end deserves its own mention because it is the one nobody finds by reading. In a flowchart, a lower-case end closes a subgraph, so a node called end — or a label written End without quotes — destroys everything after it. The diagram was correct yesterday and the only change was adding a step called end.
Because an unclosed bracket or an unterminated directive makes the parser keep consuming lines looking for the close. The line it finally fails on is where it gave up, not where you made the mistake.
In a flowchart a lower-case end closes a subgraph. A node with that id, or an unquoted label of End, is read as a close and everything after it is misparsed — which is why a working diagram breaks when someone adds a step called end.
No, and that is deliberate. Mermaid's renderer brings a large dependency tree, and the places these diagrams go — GitHub, GitLab, Notion, documentation sites — render Mermaid themselves from a fenced code block.
No. It is a static check that reports what is known to break or to render oddly. A diagram that passes here can still fail on a construct this does not know about, and one flagged here may render on a version with looser rules.
No. Front matter and directives are read as text. Nothing in the diagram is evaluated.
If a tool here saved you some time, you can put something towards the hosting.Buy me a coffee, on Ko-fi, opens in a new tab