Online Mermaid editor with live preview
Write Mermaid syntax in the editor and see the diagram in the preview, with pan, zoom and four themes. Start from one of ten templates (flowchart, sequence, class, ER, state, Gantt, pie, mindmap, Git graph, user journey), paste your own, or open a .mmd file. Export as SVG, PNG (1x, 2x or 3x) or a one-page PDF, copy the image to the clipboard, or copy a link that rebuilds the same diagram. Rendering and export happen in your browser; there is no account and nothing to install.
Runs in your browser· your diagram stays in this tab; a share link contains the diagram text
How it works
- Pick a starter from the template menu, open a file, or write your own Mermaid syntax in the editor.
- The preview re-renders automatically as you type; invalid syntax shows an error with the line number and keeps your last successful render.
- Pan and zoom to inspect the diagram, then export it as SVG, PNG or PDF, or copy a share link.
Supported diagram types
- Flowchart
- Sequence diagram
- Class diagram
- Entity-relationship diagram
- State diagram
- Gantt chart
- Pie chart
- Mindmap
- Git graph
- User journey
Export options
- SVG: the rendered vector markup, with a solid background.
- PNG: rasterised at 1x, 2x or 3x its size. Use 3x for slides or print.
- PDF: one page sized to the diagram, landscape or portrait. The diagram is an image inside the PDF, so text is not selectable.
- Copy image: puts a PNG on your clipboard.
Exports have a solid background: white for the three light themes, the dark panel colour for the dark theme. Transparent backgrounds are not available.
A live Mermaid editor that runs in your browser
Mermaid turns plain-text syntax into flowcharts, sequence diagrams, ER diagrams and more. This editor gives that syntax a live, pannable, zoomable preview with no build step and no command line. Pick a template to start from a working example, open a .mmd file, or paste your own syntax; the preview re-renders about 300 ms after you stop typing, and a syntax error is shown above the preview, with the last good render kept, instead of a blank pane. When you are done, download SVG, PNG (1x to 3x) or a one-page PDF, copy the image, or copy a compressed share link that rebuilds the same source when opened. Mermaid decides layout and edge routing, so individual nodes cannot be dragged; the interaction is whole-diagram pan and zoom.
Frequently Asked Questions
- How do I edit Mermaid diagrams online?
- Type or paste Mermaid syntax into the editor, or open a .mmd file. The preview updates about 300 ms after you stop typing, so there is no render button. If the syntax is invalid, an error appears above the preview with the line number when Mermaid reports one, and the preview keeps the last good render.
- How do I export a Mermaid diagram to PNG, SVG or PDF?
- Use the export bar under the preview. "Export SVG" downloads the vector markup. "Export PNG" rasterises the diagram at 1x, 2x or 3x its size; pick 3x for slides or print. "Export PDF" puts the diagram on a single page sized to it, landscape or portrait depending on its shape. The PDF holds an image, so text in it is not selectable. All three have a solid background.
- Can I use Mermaid without installing anything?
- Yes. The editor and the Mermaid renderer run as JavaScript in your browser tab, so there is no CLI, Node.js or headless browser to set up. For batch or CI exports, the command-line tool is still the better fit.
- Is my diagram uploaded anywhere?
- Not while you edit. Parsing, rendering, exporting and opening a file happen in your browser, and this tool has no server-side storage or account. The one exception you control is the share link: it contains your whole diagram in the URL, so anyone who has the link has the diagram, and opening it sends that URL to hexabench.dev like any page request. Do not share links for diagrams that contain secrets.
- Can I share a diagram with someone else?
- Yes. "Copy share link" compresses your source into the ?code= part of the page URL and copies it. Opening the link loads the same source into the editor. Nothing is stored on a server, so the link is the only copy; if you lose it, the diagram is gone. Very large diagrams make very long links: past about 6,000 characters the page warns that some apps cut long links, and past 20,000 it does not make a link and suggests Export SVG or Copy code instead.
- How do I zoom and pan a Mermaid diagram?
- Scroll or pinch over the preview to zoom and drag to pan. With the preview focused, the arrow keys pan, plus and minus zoom, and 0 fits the diagram to the pane. The controls at the bottom right zoom in, zoom out, fit to screen and reset to 100%, with a live zoom percentage.
- Which Mermaid diagram types can I use?
- The template menu loads working starters for flowchart, sequence, class, entity-relationship, state, Gantt, pie, mindmap, Git graph and user journey. The editor renders whatever the bundled Mermaid release (version 11) can parse under its strict security setting, so other diagram types Mermaid 11 supports may also render; the ten above are the ones with templates.
- Can I change the theme or get a transparent background?
- There are four Mermaid themes in the menu: default, dark, neutral and forest. The theme is used in the preview and in exports. Exports always have a solid background: white for the three light themes and the dark panel colour for the dark theme. A transparent PNG or SVG is not available in this version.
- How do I open a .mmd file?
- Choose "Open file" above the editor, or drag a .mmd, .mermaid, .md or .txt file onto the editor. The file is read in your browser, not uploaded, and must be under 1 MB. From a Markdown file the first fenced mermaid block is used, and the page says how many blocks there were.
- What does this editor not do?
- It does not let you drag individual nodes, because Mermaid computes layout and edge routing from the text. It has no accounts, saved diagrams, version history or real-time collaboration, and no AI generation. If you need those, use a tool that offers them; if you want a quick render and export without signing in, this is built for that.
Guides
Related Tools
Found this useful? Hexabench is free and ad-free. If it saved you time, you can support it.
Buy me a coffee →