Mermaid Renderer
A live Mermaid editor: type a Mermaid diagram on the left and the SVG render updates on the right as you type, with syntax errors shown inline. Switch between light and dark themes, zoom the preview, and export the finished diagram as an SVG or as a raster PNG. Everything runs in this tab — your diagram never leaves the browser.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
How many PNG pixels per SVG pixel when exporting. Higher = sharper, larger file.
Base name for the exported .svg and .png. Leave empty to use diagram.
The serialised SVG below is exactly what Export SVG saves, and what the PNG export rasterises onto a canvas. The preview above is the same markup inside a sandboxed iframe.
SVG source
How it works
Edit and render as you type
Type Mermaid source on the left and the diagram redraws on the right as you go. Keystrokes are debounced, so a burst of typing becomes a single render instead of one per character. Syntax errors appear inline with the line Mermaid stopped on, and the last good diagram stays on screen until you fix it.
Which diagrams it renders
Anything Mermaid itself understands: flowcharts and graphs, sequence diagrams, class and state diagrams, entity relationship diagrams, Gantt charts, pie and quadrant charts, mind maps, timelines, git graphs, user journeys, requirement diagrams, sankey, block and packet diagrams, XY charts, C4 diagrams and ZenUML. The diagram kind is read from the opening keyword of your source.
How the SVG is prepared
Rendering happens entirely in this tab. The SVG is rewritten into a self-contained file: the namespace declarations are guaranteed and a viewBox is always present, so the diagram has a real pixel size instead of a percentage width. The preview loads that markup in a sandboxed iframe with no scripts and no same-origin access, and blocks every remote request — a diagram can never fetch anything or reach this page.
Exporting the result
Export SVG saves the vector file, which stays sharp at any size and edits in any vector tool. Export PNG rasterises the same SVG on a canvas at one to eight pixels per SVG pixel — raise the scale for retina screens or print, lower it for a small file. Both downloads use the file name you set, and the theme option re-renders with the matching Mermaid palette.
Questions
Does the editor send my diagram anywhere?
No. Mermaid runs entirely in your browser and nothing is uploaded — the SVG and PNG exports are generated locally in this tab.
Why does my diagram show a syntax error?
The editor validates the Mermaid source and shows the first problem inline under the editor. Fix the marked line and the render updates automatically.
What is the difference between SVG and PNG export?
SVG is a crisp, infinitely scalable vector format. PNG is a raster image rendered from the same SVG on a canvas, so it is best for sharing where vector files are not supported.
Related tools
See categorySVG to JSX / React Component
Convert SVG or XML markup into JSX — camelCased attributes, style objects, optional component.
HTML to Markdown
Convert an HTML snippet or page into clean Markdown, on device, no server.
CSV Profiler
Profile a CSV file: per-column type inference, missing values, unique counts, and numeric stats.
JSON Formatter & Validator
Pretty-print, minify, recursively sort keys or validate JSON, with line/column errors.