Mermaid ER diagrams for the Mac
Type it or draw it.
It’s still Mermaid.
Twofold is a native Mac editor for entity-relationship diagrams. Edit the text or the canvas and both stay in sync, in a Mermaid file or right inside your Markdown docs. It all stays plain Mermaid, so it renders on GitHub, GitLab, Notion, Obsidian and your docs site.
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE_ITEM : contains
CUSTOMER {
string id PK
string name
string email UK
}
ORDER {
int id PK
string customerId FK
date placedAt
}
LINE_ITEM {
int orderId PK, FK
int quantity
}Built for diagrams that live next to your code
Text and canvas are equals
Type Mermaid or drag on the canvas. Every edit shows up in the other view straight away, and one undo history covers both.
Your text stays yours
Visual edits change only the lines they touch, so your comments, ordering and formatting stay as you wrote them. While the text has a syntax error, visual editing pauses rather than overwrite it.
Diagrams inside your docs
Open a Markdown file and edit the ER diagrams in its mermaid code blocks. Several diagrams in one file? Pick one from the title bar. The rest of the document is never touched.
Clean relationship lines
Lines route around entities with right-angle bends, attach at the nearest side, spread out where several meet, and keep their labels clear.
Detail on demand
Show entities only for the big picture, add relationships, or show every attribute. The compact views keep your arrangement, just drawn closer together.
Crow’s foot without the syntax recall
Set cardinalities from a menu or the inspector instead of remembering whether it’s }o..|{ or |o--o{.
Arrange in seconds
Select several entities to move, align or distribute them together, or let automatic layout do it. Copy and paste works as plain Mermaid, to and from other apps.
Ready for your docs
Export PNG at up to 3×, PDF or SVG, light or dark, with a transparent background if you need it. Preview diagrams in Finder with Quick Look.
Native, local and fast
A Mac app that works offline with Finder, iCloud Drive and git, and stays smooth with hundreds of entities. No account, no cloud, no subscription.
No lock-in. It’s just Mermaid.
Twofold saves standard Mermaid, in a .mmd file or in a Markdown code block. Canvas positions go after the diagram as Mermaid comments, which every other renderer ignores. Commit it, diff it, review it, and open it anywhere.
…
LINE_ITEM {
int orderId PK, FK
int quantity
}
%% @layout: node positions for the visual editor (ignored by Mermaid)
%% @pos 10 20 CUSTOMER
%% @pos 230 20 ORDER
%% @pos 230 190 LINE_ITEMComing to the Mac in 2026
A one-time purchase with a free trial. Join the waitlist to get into the beta.