Flowchart Maker
Type a few lines and get a flowchart: decisions, loops, subgraphs and colours. The chart redraws as you type, exports to SVG or PNG, and the whole thing runs in your browser.
- Diagrams render locally in your browser. Nothing is uploaded to a server.
How it works
Pick a Template (a login flow, a support decision tree or a CI pipeline) or clear the editor and start from flowchart TD.
Add nodes and arrows, one per line: A[Start] --> B{Ready?}. Labels go in brackets, arrow text goes between pipes.
Change the direction (TD for top-down, LR for left-to-right), group steps in a subgraph and colour important nodes with classDef.
Choose a theme, then copy SVG, download SVG or download PNG at 1× to 4× on a white, dark or transparent background.
A flowchart is the easiest diagram to keep correct when you write it as text. Every box is one identifier and every arrow is one line, so adding a step in the middle of a process means inserting a line, not nudging twelve boxes to make room. The layout engine (Mermaid, using dagre) routes the arrows and spaces the nodes for you, and re-routes everything when you change the structure.
Flowchart Maker syntax cheat sheet
Direction and node shapes
The first line chooses the flow direction. A node is an id followed by its shape brackets; reuse the id later to link to it.
| Syntax | Meaning |
|---|---|
flowchart TD | Top to bottom. Also TB; use LR left to right, RL, BT. |
A[Text] | Rectangle, the default for a process step. |
A(Text) | Rounded rectangle. |
A([Text]) | Stadium (pill), common for start and end. |
A{Question?} | Diamond, a decision with two or more outgoing arrows. |
A((Text)) | Circle, often used for connectors or a final state. |
A[(Text)] | Cylinder, a database or a data store. |
A[[Text]] | Subroutine box with double side lines. |
A{{Text}} | Hexagon, for preparation steps. |
A[/Text/] | Parallelogram, for input and output. |
A>Text] | Asymmetric flag shape. |
A@{ shape: cyl, label: "DB" } | Newer long-form shape syntax, available in Mermaid 11 and later. |
Links
Links connect node ids. Text on a link goes between pipes or inside the arrow.
| Syntax | Meaning |
|---|---|
A --> B | Solid arrow. |
A --- B | Line without an arrowhead. |
A -.-> B | Dotted arrow, good for optional or asynchronous paths. |
A ==> B | Thick arrow, to emphasise the main path. |
A -->|yes| B | Arrow with a label. A -- yes --> B is the same. |
A <--> B | Arrowheads on both ends. |
A --o B A --x B | Circle end and cross end. |
A ~~~ B | Invisible link; it only influences the layout. |
A --> B --> C | Chain several links on one line. |
A & B --> C & D | Link every node on the left to every node on the right. |
Subgraphs and styling
Subgraphs draw a labelled box around a group of nodes. Styling is applied with classes so one definition can colour many nodes.
| Syntax | Meaning |
|---|---|
subgraph id [Title] … end | Group nodes in a titled container. Subgraphs can nest and can be linked to like nodes. |
classDef warn fill:#fde2e1,stroke:#b94738 | Define a reusable style called warn. |
A:::warn | Apply the class to a node as you declare it. |
class A,B warn | Apply the class to several existing nodes. |
style A fill:#ffd,stroke-width:2px | Style a single node directly. |
linkStyle 0 stroke:red | Style a link by its position, counting from zero. |
%% a comment | Comment line; Mermaid ignores it. |
Habits that keep a flowchart readable
- Use short ids (
A,login) and put the human wording in the brackets, so a rename is a one-line change. - Give every decision diamond a label on each outgoing arrow. A diamond with unlabelled exits is the most common reason a flowchart confuses readers.
- Pick the direction to suit where the chart will live:
LRfor a wide slide or a README,TDfor a tall page. - If a chart passes about 25 nodes, split it into subgraphs or into two charts that link to each other.
Where the code renders
GitHub, GitLab, Notion and Obsidian all render a fenced code block tagged mermaid. Copy the code from the editor, paste it between ```mermaid and ``` in a README, issue, pull request, wiki page or note, and the platform draws the flowchart itself. In Notion, add a code block and set its language to Mermaid. The platforms ship their own Mermaid versions, so a very recent syntax such as the @{ shape: … } form may render in this editor before it renders there. For a slide, a Word document or a chat message, export a PNG or an SVG instead.
Text first, not drag and drop
This is a text-first flowchart maker: there is no canvas to drag boxes onto, and you cannot nudge one node a few pixels to the left. The layout is automatic. That is a deliberate trade. A flowchart written as text can live in your repository next to the code it describes, shows up as a readable diff in review, and never ends up with misaligned boxes. If you need pixel-level control of every shape, a drawing tool is the better fit; export the SVG from here and finish it there.
Export and sharing
Pick copy SVG or download SVG for a sharp vector file, or download PNG at 1×, 2×, 3× or 4× on a white, dark or transparent background. Share link compresses the code with lz-string and puts it in the URL fragment, the part after #, which browsers never send to a server. Your draft is saved in this browser's local storage, separately from the other diagram pages, so a refresh does not lose it. For other diagram types such as class, state, pie, timeline and git graph, use the full Mermaid editor.
Frequently asked questions
Frequently asked questions
How do I make a flowchart from text?
Start with flowchart TD on the first line, then write one link per line, such as A[Start] --> B{Ready?}. Square brackets make a rectangle, curly braces a decision diamond. The preview redraws a moment after you stop typing.
How do I add yes and no labels to a decision?
Put the text between pipes after the arrow: B -->|Yes| C and B -->|No| D. Writing B -- Yes --> C works too.
Can I change the colours of nodes?
Yes. Define a class with classDef name fill:#fde2e1,stroke:#b94738 and attach it with A:::name or class A,B name. The four built-in themes (default, dark, forest, neutral) change the overall palette.
How do I put the flowchart in a README or slide?
For a README, paste the code in a mermaid fenced block and GitHub or GitLab draws it. For slides and documents, download a PNG at 2× or higher, or an SVG if the tool accepts it.
Is my flowchart uploaded anywhere?
No. Parsing, layout and export all happen in this page. The draft is kept in your browser's local storage, and a share link stores the chart in the URL fragment, which browsers never send to a server.