Diagram & Flowchart Maker
Write flowcharts, sequence diagrams and mind maps as text and get a laid-out SVG/PNG diagram.
How it works
Type a diagram in a Mermaid-like text syntax – flowcharts (top-down or left-right, node shapes, labelled arrows), sequence diagrams (participants, messages, notes, loop/alt blocks) or indented mind maps – and get an automatically laid-out, accessible SVG with SVG/PNG downloads. Syntax errors are reported with line numbers.
- The text is parsed line by line; every error is reported with its line (and column for flowcharts). Supported: flowchart/graph TD|TB|BT|LR|RL with shapes [rect] (round) ([stadium]) [[subroutine]] [(database)] ((circle)) {diamond} {{hexagon}} [/parallelogram/] [/trapezoid\] >flag], arrows --> --- -.-> ==> <-->, labels -->|text| or -- text -->, chains A --> B --> C and groups A & B --> C; sequenceDiagram with participant/actor (… as Alias), ->> -->> -> --> -x --x -) --), Note left of/right of/over, loop/alt/else/opt/par/critical/break … end, autonumber; mindmap with indentation and the usual node shapes.
- Flowcharts are laid out with a layered (Sugiyama-style) algorithm: cycles are broken by reversing DFS back edges; nodes get the longest-path layer (edges with labels span two layers so the label gets its own slot); long edges get dummy nodes; crossings are reduced with 24 alternating barycentre sweeps plus adjacent swaps, keeping the best ordering; positions are assigned by order-preserving least squares (isotonic regression) toward the neighbours, which keeps long edges straight.
- Sequence diagrams place participants in order of appearance, widen gaps to fit message texts and stack messages, notes and blocks top-down. Mind maps are drawn as a two-sided tree, balancing first-level branches by their number of leaves.
- Styling statements (style, classDef, class, linkStyle, click) and subgraph frames are accepted but not drawn; they are listed as ignored lines. The output is plain SVG (no scripts, no external references) that passes the site’s strict sanitiser; arrowheads are drawn as shapes so PNG export keeps them.
A Mermaid-like subset, not full Mermaid compatibility: complex features (subgraph frames, styling, class diagrams, Gantt charts) are not supported.
Use this tool in an app
These free programs for your browser have this tool built in, next to everything else the task needs.
-
RavingDesk Paper trading & data workspace
Practise trading on paper and chart your data: orders, risk, datasets, analyses, reports.
-
Deckwright Slide deck studio
Write Markdown, get an accessible slide deck — charts, diagrams, PDF, HTML and PowerPoint.
Related tools
- Embeddable Chart Builder – Make a self-contained chart to embed anywhere: inline SVG, standalone HTML, accessible snippet.
How to use the Diagram & Flowchart Maker
Write flowcharts, sequence diagrams and mind maps as plain text in a Mermaid-like syntax and get an automatically laid-out SVG or PNG.
What it is for
Dragging boxes around in a drawing program is slow, and every change means re-aligning arrows. Here you describe the diagram as text and the layout is computed for you: an order process, a login flow between browser and server, or a brainstorm. The syntax follows Mermaid closely, so many existing Mermaid flowcharts work as they are. Three diagram types are supported:
- flowchart (TD, LR, BT, RL) with shapes such as
[box],{decision},([stadium]),[(database)]and labelled arrows-->|yes|; - sequenceDiagram with participants, actors, messages, notes and loop/alt/opt blocks;
- mindmap written as an indented list.
You get an accessible SVG plus a PNG. It's a subset of Mermaid: subgraph frames, styling and other diagram types (class, Gantt, state) are not drawn.
Worked example
The default example describes order handling:
flowchart TD
start([Order received]) --> pay{Paid?}
pay -->|Yes| pick[Pick items]
pay -->|No| remind[/Send reminder/]
remind --> pay
...
back -.-> pick
ship --> done((Done))
Result: "Flowchart "Order handling" (TD): nodes 8, connections 9, laid out at 398×657 px." The layout block reports 11 layers, 0 crossings, 2 reversed edges and 11 dummy nodes. The two loops (reminder → payment and backorder → picking) point upwards, so they were temporarily reversed for the layering. The dummy nodes are bends that keep long arrows clear of boxes.
We also wrote a left-to-right blog workflow that included style publish fill:#0f0 and an empty subgraph Team … end. The diagram rendered (4 nodes, 4 connections), with the warning "3 line(s) with styling, subgraph or activation statements were accepted but are not drawn (lines 5, 6, 7)." A typo, B{Choice without the closing brace, stopped the run with "Line 2: Missing "}" to close the label of node B (column 15)".
How to read the result
- Summary: diagram type, number of nodes/participants/topics and connections, and the final size in pixels.
- Layout (flowcharts): crossings should ideally be 0. Reversed edges are your loops. Many dummy nodes mean long arrows, so the diagram may be easier to read in the other direction (LR instead of TD).
- Ignored lines lists syntax that was understood but not drawn.
- Downloads: SVG for documents and the web (it scales without blur), PNG for slides and chat.
Tips and common mistakes
- Give nodes short ids and put the text in the brackets:
pay{Paid?}. Then you can reusepayin later lines without repeating the label. - Wide processes with many steps fit pages better as
flowchart LR. Decision trees usually read better asTD. - Use chains (
A --> B --> C) and groups (A & B --> C) to keep the source short. - In sequence diagrams,
->>is a solid message,-->>a dashed reply, andautonumbernumbers every message. - Wrap labels that contain the same bracket as their shape in double quotes:
A["Save [beta]"]. Without the quotes, the first]ends the label and you get an error. - Text width is estimated from average glyph widths, so labels can sit slightly off-centre in unusual fonts. The PNG uses the same layout.
FAQ
Can I paste my existing Mermaid code?
Flowcharts, sequence diagrams and mind maps in the common syntax usually work. Styling, class definitions, click handlers and subgraph frames are accepted but ignored. Other Mermaid diagram types are rejected.
Why are my colours not applied?
style, classDef and linkStyle lines are not drawn. The output uses a fixed, accessible style. Edit the downloaded SVG if you need your own colours.
Can I edit the diagram later?
Keep the text. It's the editable source. Paste it back in, change a line and generate again, and the layout is recomputed.
Is the SVG safe to embed?
Yes. It's plain SVG without scripts or external references, and it passes the site's strict sanitiser.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://diagramflowchartmaker.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://diagramflowchartmaker.usefulweb.site/mcp· tool namediagram_flowchart_maker
Example request
curl -s -X POST https://diagramflowchartmaker.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"source":"flowchart TD\n start([Order received]) --> pay{Paid?}\n pay -->|Yes| pick[Pick items]\n pay -->|No| remind[/Send reminder/]\n remind --> pay\n pick --> stock{In stock?}\n stock -->|Yes| ship[[Ship parcel]]\n stock -->|No| back[(Backorder list)]\n back -.-> pick\n ship --> done((Done))","title":"Order handling"}'