Mermaid is a text-based diagramming syntax that lets you describe flowcharts and sequence diagrams in code.
You can paste Mermaid code directly onto a Whimsical board as an editable diagram. You can also copy flowcharts and diagrams as Mermaid to paste into other Mermaid-compatible tools.
You can paste Mermaid code directly into a Whimsical board as an editable flowchart or sequence diagram. This is handy for bringing in diagrams from docs, GitHub, or anywhere else you've got Mermaid code.
To paste Mermaid code:
Command + V (Mac) or Control + V (PC) - We’ll automatically recognize the Mermaid syntax and render it as a diagram.
Whimsical supports both flowcharts (graphs), and sequence diagrams for import.
You can export any flowchart or sequence diagram back out as Mermaid code for use with GitHub, Notion, GitLab, or other tools that render Mermaid code.
To copy a diagram as Mermaid code:

The exported code preserves the color and styles of your shapes and connectors.
Nodes are output in topological order, so the code flows in the same direction as your diagram. This ensures compatibility with how tools like GitHub use text ordering to influence layout.
Mermaid supports multiple flow directions, and Whimsical honors all of them when you paste or generate a diagram:
To get a horizontal diagram, just make sure your Mermaid code specifies the direction. For example, with "flowchart LR" at the top of your code:
If you're generating a flowchart with Whimsical AI, you can specify the layout direction in your prompt. For example, "Create a left-to-right flowchart of the user onboarding process."
Subgraphs let you group related nodes together inside a larger flowchart. In Whimsical, subgraphs map to grouped and nested shapes, so the visual hierarchy in your Mermaid code carries over directly into your board.
Subgraphs are supported across all three Mermaid workflows:
Note: Using different directions inside individual subgraphs isn't currently supported. The whole diagram must use a single layout direction.
Here’s a reference for the Mermaid syntax Whimsical supports when importing or generating diagrams.
[text] - Rectangle{text} - Diamond (decision)([text]) - Pill / stadium((text)) - Circle / ellipse{{text}} - Hexagon[(text)] - Cylinder—> - Arrow—>|Label| - Labeled arrow=⇒ - Thick arrow←→ - Bidirectional arrow-.- - Dashed line; -.→ - Dashed arrowx—x - Diamond endpointso—o - Circle endpoints~~~ - Invisible edge (rendered as a normal connector)A & B —> C & D - Multi-node connectionsclassDef className fill:#hex,stroke:#hex - Define a style class:::className - Apply a class inline to a node (requires a matching classDef)linkStyle 0,1,2 stroke:#hex - Color specific connectors (0-based index)linkStyle 3 stroke:#hex,stroke-dasharray:5 5 - Dashed connectorNote: Inline :::className annotations are supported when used alongside a classDef definition. Without a matching classDef, the annotation will be ignored — but the rest of the diagram will still paste correctly.
participant Alice - Define a participantAlice→>Bob: message - Solid arrowBob—>>Alice: response - Dashed arrowIf you use a coding agent like Claude, Cursor, or Windsurf, you can connect it to Whimsical via the Whimsical MCP server. Then your coding agent can generate Mermaid diagrams and build them directly in your Whimsical workspace, without any copying and pasting.
This is a powerful tool to generate architecture diagrams, flowcharts, or sequence diagrams from code, specs, or prompts. For example, you could ask your coding agent to:
To try it out, check out the related articles 👇