Start from an example or paste a Mermaid definition. Render the text, check the preview and export a diagram for your documentation.
Runs locally in your browserUse Mermaid syntax only. HTML labels are sanitized: scripts and event handlers are removed.
Keep a Mermaid definition beside your code, render it here for review, and download the output when you need a portable image. The tool deliberately avoids remote themes, cloud storage, and generated tracking links.
Paste a Mermaid definition and the page draws it with a bundled Mermaid 11.17.1 renderer, then lets you copy the SVG markup or download it as kivtools-diagram.svg. The three built-in examples — flowchart, sequence diagram and ER model — are starting points: the renderer also accepted state diagrams, class diagrams and Gantt charts in testing, because it parses the full Mermaid grammar.
Parsing, layout and styling run in this browser tab. The diagram text is never uploaded, rendering works offline once the page has loaded, and the exported SVG carries its own styles instead of referencing external files.
The first line selects the grammar: flowchart LR, sequenceDiagram, erDiagram, stateDiagram-v2, classDiagram, gantt and the other Mermaid 11 types all rendered in testing. An unknown first keyword stops the parser immediately, and a definition copied from a different tool may use syntax this version no longer accepts.
The editor is plain text: there is no autocomplete and no live preview, so render after each change and use the status line as the only feedback channel. Reloading the example selector is the quickest way back to a document that is known to parse.
The renderer runs in Mermaid strict mode. In testing, a label containing <img src=x onerror=...> came back with the event handler stripped, script tags did not execute, javascript: links were dropped, and click directives produced no external links. Labels may contain safe HTML such as bold text and line breaks.
Treat that as a sanitation guarantee, not a ban on HTML: the tool removes executable content from labels but does not reject the definition. Keep diagram text free of anything sensitive anyway — the page is local, but the exported SVG is a file you may share.
Copy SVG places the live SVG markup on the clipboard; Download SVG saves the same markup as kivtools-diagram.svg. Both stay disabled until a diagram has been rendered, and Clear disables them again. The exported file opens standalone and can be embedded in Markdown, an HTML page or a pull request.
A syntax error does not empty the stage: the last successful preview remains visible while the status line shows the parser message with its line number. Check that line before copying an SVG, especially when the diagram was edited in a hurry.