Mermaid Diagram Viewer
Render Mermaid flowchart code as a diagram with live preview, subgraphs, light or dark theme, and SVG or PNG export.
Mermaid Diagram Viewer
Preview
Updated . Provided as is. Check the output before you rely on it in production.
How to use Mermaid Diagram Viewer
- 1
Paste Mermaid flowchart syntax
Enter a flowchart (graph TD or graph LR) with nodes, edges and labels, or load one of the sample diagrams.
- 2
See the preview update
The diagram renders as you type. Invalid syntax shows an error message; fix it and the preview comes back.
- 3
Refine the diagram
Add nodes, connections and labels and watch the preview. Switch between the dark and light theme to match where the diagram will be shown.
- 4
Export as SVG or PNG
Download SVG for documentation that needs crisp scaling, PNG for slides and chat, or copy the SVG markup.
- 5
Reuse the source
Copy the Mermaid code into a GitHub README or any platform that renders Mermaid natively.
Questions and answers
What diagram types are supported?
Can I export diagrams as images?
Can I use this for GitHub README diagrams?
Does it show syntax errors?
Is this tool free and private?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/mermaid-viewer/
For automation planning, fetch the canonical contract at /api/tool/mermaid-viewer.json.