PasteZap
🌐 English
Free · No account

FREE · DIAGRAM TOOLS

Mermaid Live Editor.

Write Mermaid code and see flowcharts, sequence, class, state, ER, Gantt and mind map diagrams render live, then export SVG or PNG.

Limits & supported formats

Up to 50,000 characters of Mermaid code and 800 connections. PNG export up to 32 megapixels. Share links are limited to diagrams that compress to about 12,000 characters. Mermaid 11 syntax; no real-time collaboration or cloud storage.

LIVE MERMAID PREVIEW · RUNS IN YOUR BROWSER · NO ACCOUNT
Templates
Flowchart
Workflow
Sequence
UML
Entity relationship
Gantt
Mind map
Charts
213 / 50,000
Insert
Add a step without writing code
Loading the diagram engine…

Rendered with the open-source Mermaid library. Your code and drafts stay in this browser.Shortcut: Tab indents 4 spaces.

How to use Mermaid Live Editor

Choose a template or paste Mermaid code. The preview updates as you type and points to the line of any syntax error. Adjust theme and style, then download SVG or PNG, copy a Markdown block or create a share link.

How it works

Mermaid turns short text definitions into diagrams. Rendering uses the open-source Mermaid library in your browser with its strict security level, so links, scripts and HTML in labels are disabled. Drafts are saved in this browser only; share links store the compressed code in the part of the URL after #, which browsers do not send to the web server. Exports contain only what you drew.

Example

flowchart TD; A[Order] --> B{Paid?} → a rendered decision flowchart ready to export as SVG.

What is Mermaid?

Mermaid is an open-source, text-based diagram language. Instead of dragging boxes and arrows, you describe a diagram in a few readable lines and Mermaid lays it out automatically. Because a diagram is plain text, it can live next to your code, be reviewed in a pull request and be updated in seconds when a process changes.

This Mermaid live editor renders your code as you type, highlights syntax errors and keeps the last valid diagram visible while you fix them. It includes templates for every common diagram type, a no-code form for adding flowchart steps, themes, a hand-drawn style and export to SVG, PNG, Markdown and share links.

Supported diagram types

The first keyword of your code selects the diagram type. Each type has a dedicated page with focused templates and a guide:

DiagramFirst lineTypical use
Flowchartflowchart TDProcesses, algorithms and decisions — see the Flowchart Maker
Workflow / swimlanesflowchart LR with subgraphWho does what in a business process — see the Workflow Diagram Maker
Sequence diagramsequenceDiagramAPI calls and interactions over time — see the Sequence Diagram Maker
Class diagramclassDiagramObject models and UML classes
State diagramstateDiagram-v2Lifecycles such as order or ticket status
Entity relationshiperDiagramDatabase schemas — see the ER Diagram Maker
Gantt chartganttProject schedules — see the Gantt Chart Maker
Mind mapmindmapBrainstorming and notes — see the Mind Map Maker
Pie, timeline, journey, quadrant, git graphpie, timeline, journey, quadrantChart, gitGraphSimple charts, roadmaps, user experience and branching strategies

Mermaid syntax cheat sheet

A flowchart starts with a direction: TD (top-down), LR (left to right), BT or RL. Nodes have an identifier and an optional label whose brackets set the shape. Arrows connect identifiers and can carry text between pipes.

flowchart LR
    A[Rectangle] --> B(Rounded)
    B --> C{Decision}
    C -->|Yes| D([Stadium])
    C -.->|No| E[(Database)]
    E ==> F((Circle))
    %% Lines starting with %% are comments
  • --> solid arrow, --- line without arrowhead, -.-> dotted arrow, ==> thick arrow.
  • subgraph Name … end groups nodes into a box or swimlane.
  • classDef name fill:#fde,stroke:#c33 defines a style; class A,B name applies it.
  • Wrap labels containing brackets, colons or quotes in double quotes: A["Total (EUR): 25"].

Export Mermaid to SVG, PNG or Markdown

Download SVG for documents, websites and slides that need sharp lines at any size, or PNG at 1× to 4× resolution for chat apps, tickets and tools that do not accept SVG. The background can match the theme, be white or be transparent.

“Copy for Markdown” wraps the code in a fenced code block tagged mermaid. GitHub, GitLab, Obsidian and Notion can render such blocks directly, so the diagram stays editable in your README, wiki or notes. Those platforms ship their own Mermaid version, so very recent syntax may render here but not there yet; exporting an SVG avoids that difference.

Use “Save .mmd” to keep an editable source file, and “Open file” to load .mmd, .mermaid, .txt or a Markdown file — the first Mermaid block in a Markdown file is extracted.

Fixing common Mermaid syntax errors

  • A lowercase node called end breaks flowcharts because it closes a subgraph. Write End or finish[end] instead.
  • Parentheses, brackets or colons inside a label must be quoted: A["Step (optional)"].
  • In a Gantt chart, dates must match the dateFormat line exactly, and task identifiers used with after must exist.
  • In a mind map, indentation defines the tree. Mixing tabs and spaces can attach a branch to the wrong parent; the editor inserts four spaces when you press Tab.
  • Error messages give a line number. The editor keeps the last valid diagram on screen, so you can compare it with your change.

Privacy and offline-friendly editing

Rendering happens in your browser with the open-source Mermaid library. Your code is not uploaded, drafts are kept in this browser’s local storage, and a share link stores the compressed diagram after the # sign, which browsers do not send to the web server.

Once the page and the diagram engine have loaded, rendering does not need further requests, which makes it suitable for internal architecture diagrams, incident timelines and other material you would rather not paste into an online account.

Questions about Mermaid Live Editor

Is this an alternative to the official Mermaid Live Editor?

It is an independent editor built on the same open-source Mermaid library (version 11). It is not affiliated with the Mermaid project. It adds a no-code flowchart step form, PNG scaling up to 4×, transparent backgrounds and focused pages for each diagram type.

Can I use the exported diagrams commercially?

Diagrams you create are your own work. Mermaid itself is released under the MIT licence. PasteZap adds no watermark to SVG or PNG exports.

Can I drag nodes to reposition them?

No. Mermaid calculates the layout automatically from the code. You can change direction, order lines differently or group nodes in subgraphs to influence the result. This is what keeps diagrams quick to update.

Does the editor support the ELK layout or custom icons?

No. The editor uses Mermaid’s standard layout engine, and icon packs that require external fonts or images are not loaded. Links and HTML in labels are disabled by the strict security level.

How do I share a diagram with a colleague?

Choose “Share link”. The compressed code is stored in the link after the # sign, so nothing is saved on a server. Very large diagrams are too long for a link; send the .mmd file instead.

Is Mermaid Live Editor free, and do I need an account?

Yes. This tool is free to use in your browser without an account. Processing takes place on your device.

What are the limits and what should I check?

Up to 50,000 characters of Mermaid code and 800 connections. PNG export up to 32 megapixels. Share links are limited to diagrams that compress to about 12,000 characters. Mermaid 11 syntax; no real-time collaboration or cloud storage. Review the result before using it in your work.

Is my input sent to a server?

Your input is processed in your browser and is not uploaded by this tool. Files and pasted text are cleared when the page is refreshed. Normal website requests are still required to load the page and its libraries. Read the privacy explanation.