Skip to content

Mermaid diagrams

Mermaid is a small text language for diagrams. You write a few lines, and they describe the boxes and arrows:

flowchart LR
  order[Order placed] --> pay{Paid?}
  pay -->|yes| ship[Ship it]
  pay -->|no| remind[Send a reminder]

You'll meet Mermaid in README files, in wikis, and in the answers chat assistants give when you ask them to sketch a process. SimpleDiagrams reads that text and draws it with its own shapes, so you can tidy the diagram, style it and keep working on it. It also writes a page back out as Mermaid text, for when the diagram needs to live next to code. Nothing in the text ever runs, and nothing leaves your Mac.

Paste it in

The quickest way in is the one you'd guess: copy the Mermaid text and choose Edit ▸ Paste on the canvas. The diagram appears in the middle of what you can see, selected, so you can move it straight away. One Undo takes the whole paste back.

If the text came from a chat wrapped in a code fence (three backticks and mermaid), paste it as it is. SimpleDiagrams takes the diagram out of the fence. If there are several fenced diagrams, it uses the first and tells you how many it left.

Pasting text that isn't Mermaid works just as it always has. SimpleDiagrams only treats text as Mermaid when its first real line names a kind of diagram, such as flowchart LR or sequenceDiagram.

You can also drag Mermaid text onto the canvas. It lands where you drop it.

A big diagram can take a moment to lay out. If it takes long enough to notice, a small window says so, with Cancel.

Open a file

Choose File ▸ Open… and pick a .mmd or .mermaid file, or drop one on the SimpleDiagrams icon or a window. It opens as a new, untitled diagram of one page. The file itself is never changed: save the new diagram to keep it.

What comes across

SimpleDiagrams reads seven kinds of Mermaid diagram:

Mermaid Becomes
flowchart (or graph) Basic shapes joined by connectors, with subgraphs as containers
sequenceDiagram Lifelines and messages, with notes and Loop, Alt and Opt fragments
classDiagram UML class boxes, with members, relationships and namespaces
stateDiagram-v2 Rounded states, UML Initial and Final nodes, and composite states as containers
erDiagram Entity tables from the Database library, joined by their relationships
pie A pie: a Ring at full width, its sections in Mermaid's order
gantt A Gantt Chart, with its sections, tasks and milestones

Mermaid doesn't say where anything goes; it only says what joins to what. So SimpleDiagrams lays the diagram out itself, in the direction the text asks for (LR, TD and so on), keeping crossings few. The connectors are right-angle ones, so they reroute as you move shapes about.

Each shape Mermaid gives a name keeps it in an ID field in the Shape Data panel. That's how an exported diagram keeps the names you started with. A title: at the top of the text names the page.

Notes come across as notes you can edit. A diagram's description (accDescr) becomes a collapsed Documentation note at the top left of the page, and an ER diagram's attribute comments become one Documentation note per table, linked to it.

What's simplified, and why

Mermaid has a lot of options, and SimpleDiagrams brings in the ones people use most. The rest it simplifies rather than refusing the whole diagram, and it always tells you. If something you'd notice is missing, such as a comment or an image, a sheet lists it as the diagram arrives. Everything else, such as settings and theme colours, is listed in File ▸ Show Import Summary.

A few things you might notice:

  • Nothing in the text runs or loads. Links, click actions and image or icon addresses are left out, so opening a diagram someone sent you can never open a web page or fetch anything.
  • Pie values become percentages. A Ring holds shares, not raw numbers, so 386, 85 and 15 come in as 79%, 18% and 3%. They always add up to exactly 100, and a tiny slice still shows as 1%. A Ring holds 20 sections, so a pie with more keeps its 19 largest slices and puts the rest in one section called "Other".
  • Sequence numbers become text. With autonumber, each message's number is written at the start of its label, because a lifeline message has no numbering of its own.
  • Colours come in for flowcharts and state diagrams only. In class and ER diagrams, style lines are left out, and the shapes keep their usual look.
  • A line SimpleDiagrams can't follow is skipped, and the summary counts it. One typo never costs you the rest of the diagram.

What won't open

Mind maps, timelines, user journeys, quadrant charts, Git graphs and Mermaid's other kinds don't open. SimpleDiagrams says which kind it found and which kinds it can open. Very large diagrams, over 1 MB of text or 5,000 shapes, don't open either.

Export a page

Choose File ▸ Export as Mermaid… to write the current page to a .mmd file. SimpleDiagrams looks at what's on the page to decide which kind of diagram to write, and takes the first that fits:

  1. A Gantt Chart makes a Gantt chart.
  2. Lifelines make a sequence diagram.
  3. Entity tables make an ER diagram.
  4. UML class boxes make a class diagram. A table counts when its UML Box says Class, Interface or Enumeration.
  5. A Ring on its own, perhaps with a title above it, makes a pie chart.
  6. A UML Initial or Final node makes a state diagram.
  7. Anything else makes a flowchart.

A Mermaid file holds one diagram, so anything that doesn't belong to that kind is left out, and SimpleDiagrams lists what it left out. Connectors that aren't attached at both ends, loose text and bitmap images stay behind too. Exporting never changes your diagram.

If a page mixes things, say a flowchart beside a pie, select the part you want and use Copy as Mermaid instead.

Copy as Mermaid

Edit ▸ Copy as Mermaid puts the selection, or the whole page when nothing is selected, on the clipboard as Mermaid text. It's the same text Export as Mermaid… would write, ready to paste into a README, an issue or a chat.

Round trips

Open a Mermaid diagram, edit it, and export it again, and you get the same shapes, names, labels, links, groups, notes and description back. The layout doesn't travel, because Mermaid has no place for it: whoever opens the text next lays it out again. Two things come back changed, as described above: pie values as percentages, and autonumber as numbers in the message text.

Gantt charts

Paste or open a gantt block and it becomes one Gantt Chart, which you edit in its settings like one you placed from the Complex Shapes library:

gantt
    title Launch plan
    dateFormat YYYY-MM-DD
    excludes weekends
    section Build
    Prototype :proto, 2026-11-09, 10d
    Testing :crit, after proto, 5d
    section Ship
    Launch :milestone, 0d

The title, the sections and each task's name come across as written. So do the marks done, crit (shown as Critical) and milestone, a task's start date, a task that starts after another, and each task's length. excludes weekends turns on Skip Weekends, so lengths count Monday to Friday, as Mermaid counts them.

A Gantt Chart counts in whole days, so a few things are simplified, and the summary says which:

  • Lengths become days. Weeks, hours, months and end dates become a number of days, on the same days wherever they can be. Part of a day is rounded up to a whole one.
  • A task follows one task. A task that waits for several (after a b) follows the one that ends last, which gives it the same start.
  • Times of day are dropped, so a task starts at the start of its day.
  • active and vert are left out. An active task is drawn as an ordinary one, and vertical markers aren't drawn.
  • Only weekends can be skipped. Holidays and other days off are left out, and lengths count through them.
  • A circle of tasks is broken. If tasks wait for each other in a loop, one of them gets a start of its own, so the chart still opens.

A Gantt Chart holds up to 60 tasks in 20 sections, dated from 1900 to 2199. Why 60? Each bar has a connection point at each end, so you can draw arrows between bars, and 60 bars use all the points one shape can hold. A longer chart keeps its first 60 tasks, and a task dated outside those years is left out rather than moved. The summary says how many tasks it left out, and a section left with none goes with them.

Export writes the chart back as it is: its title, dateFormat YYYY-MM-DD, excludes weekends when Weekends: Skip is on, the sections, and each task with its marks, its start or the task it follows, and its length in days. A task that another follows gets a short id, t1, t2 and so on. Mermaid ends a task's name at a colon, so a colon in a name is written as a space. A name Mermaid would mistake for something else, such as "Title page" (Mermaid reads title as the chart's title) or one with a % in it, is written in quotes so it stays whole. Mermaid may show the quote marks; SimpleDiagrams takes them off again when you open the text.