Local syntax check
Mermaid Syntax
Paste Mermaid syntax and see whether the diagram text parses. The checker looks at the diagram type, nodes, connections, and groups in this browser.
Paste Mermaid code or load a template to render a diagram.
No upload. The current source stays in this tab.
The first line names the diagram
A flowchart starts with flowchart and a direction such as LR for left to right or TB for top to bottom. Other diagrams start with their own keyword. If that first line does not match the lines below it, the check fails even when the arrows look familiar.
Nodes, labels, and arrows
A node can be an id alone or an id plus a label in brackets, such as review[Review docs]. An arrow is written as -->. A label between pipes, such as A -->|Needs edits| B, sits on the connection. A missing bracket is a syntax error, not a styling choice.
Subgraphs and comments
subgraph starts a group and end closes it. A group without end does not parse. Comments start with %%. Diagram types that are not flowcharts use different openers. Mermaid diagram syntax lists those openers.
Mermaid syntax FAQ
Is Mermaid syntax the same as Markdown?
No. Markdown can hold a mermaid code fence, but the diagram language is separate. Use the Markdown preview to see a fence inside a document, and use this page to check the diagram text itself.
Why does familiar text fail the check?
The diagram keyword, direction, brackets, and quotes have to match. A sequence message uses ->> rather than the flowchart arrow -->. The error from the parser names the problem without sending the text away.
Does the syntax check upload my diagram?
No. Parsing and the preview both run in this tab.