Mermaid Live Editor

Create Mermaid.js diagrams with a live preview, syntax help, and shareable output.

Updated Dec 06, 2025

Mermaid Code
Loading editor…
Preview

Diagram as code

Render Mermaid diagrams with live previews

Mermaid syntax lets you describe flowcharts, sequence diagrams, Gantt charts, and more using plain text. This viewer provides instant rendering, template shortcuts, and export options for documentation or workshops.

Code-first diagrams

Choose a template (flowchart, sequence, class, state, Gantt, pie, ER) and the editor seeds the panel with a working snippet. As you type, the preview updates immediately, letting you experiment with arrows, participants, and styles without waiting for build steps.

Because diagrams are text, they remain version-controlled and easy to review. Use this viewer to prototype before committing to README files or architecture docs.

  • Theme controls

    Switch between default, forest, dark, or neutral themes to match your documentation palette.

  • Error surfaces

    Inline errors highlight which line broke rendering so you can fix typos quickly.

Share anywhere

Export the rendered SVG or PNG asset, or copy the Mermaid source for teammates to paste into Markdown. The viewer supports embedded comments and clickable links, making it perfect for interactive runbooks.

Since everything happens locally, you can finalize diagrams containing unreleased architecture details without exposing them to online editors.

  • Keyboard shortcuts

    Duplicate nodes, indent blocks, or format code without leaving the keyboard.

  • Large diagram support

    Zoom and pan controls help you navigate massive graphs or state machines smoothly.

Teams use Mermaid Viewer for

Architecture reviews

Sketch service interactions and land them in design docs during live meetings.

Incident retrospectives

Illustrate timelines or ownership flows inside postmortems.

Onboarding guides

Explain pipelines and roles with diagrams that stay in sync with Git.

Product specs

Embed feature flows directly into Markdown specs without screenshot churn.

Next step

Need a visual editor too?

If you prefer drag-and-drop creation, continue your work in the Diagram Viewer and bring the exports back into your docs.

Open Diagram Viewer

Popular combinations

Frequently asked questions

What is Mermaid.js?

Mermaid is a JavaScript-based diagramming and charting tool that uses Markdown-inspired text definitions to create diagrams dynamically.

What types of diagrams can I create?

You can create Flowcharts, Sequence Diagrams, Class Diagrams, State Diagrams, Entity Relationship Diagrams (ERD), Gantt charts, User Journey diagrams, Pie charts, and more.

Can I export my diagrams?

Yes. You can export your rendered diagrams as SVG or PNG images, making it easy to embed them in presentations or documents.

Is this tool free?

Yes. This Mermaid Viewer is completely free to use. All rendering is done locally in your browser.

How to use Mermaid Live Editor

Follow these four quick steps to inspect markup or diagrams with instant previews right inside your browser—no downloads, no accounts, and no data leaving the FreeTools.run sandbox.

  1. Step 1: Load your source data

    Paste text, drag a file, or start with our curated sample to understand how the viewer workflow behaves with real inputs.

  2. Step 2: Adjust tool options

    Toggle presets, update formatting rules, or choose export preferences. All controls update in real time so you can preview the effect before committing.

  3. Step 3: Review the live preview

    Use the split-pane preview, inline validation, or diff output to confirm the transformation looks correct before you copy anything back into your project.

  4. Step 4: Export or chain another tool

    Copy the result, download a file, or jump into a related FreeTools.run utility (like Diff Checker or the QR Code Generator) to continue the workflow without leaving the browser.

Mermaid Live Editor | FreeTools.run | FreeTools.run