ChatGPT writes the Mermaid. This draws it — paste, fix the syntax, edit, export.
Flowchart of a login flow: email and password, then a 2FA code if enabled. Wrong password shows an error and returns to the form. Lock the account after 5 failed attempts.
Try it →Sequence diagram: browser calls the API gateway, gateway authenticates against the auth service, then calls the order service, which writes to Postgres and publishes an event to Kafka.
Try it →ERD for a blogging platform: users write posts, posts have comments and tags, tags are many-to-many with posts. Include primary and foreign keys.
Try it →State diagram for an order: created, paid, packed, shipped, delivered. Payment can fail back to created, and anything before shipped can be cancelled.
Try it →The answer ends in a Mermaid code block you cannot see. Paste it here and it becomes a real diagram in one step — no install, no signup, no local toolchain.
Unescaped brackets in a label, an arrow from the wrong diagram type, a sentence left above the code. The renderer points at the failing line instead of going blank.
Going back to ChatGPT for a small change often rewrites the whole diagram. Edit the node here directly, or describe the change in Chat mode and keep everything else intact.
Export SVG for crisp scaling in Notion, Confluence or Google Slides, PNG for Slack and tickets. The chat window gives you neither.
Copy the cleaned-up Mermaid back out and commit it in a README or an ADR. Plain text diffs in review; a screenshot does not.
Ask ChatGPT for a diagram and you get text, not a picture. Usually that text is Mermaid — a plain-text diagram syntax that looks like "flowchart TD / A[Start] --> B[End]". Sometimes it is ASCII art, sometimes it is a numbered description of boxes and arrows. What you almost never get is something you can paste into a document.
That is not a bug in your prompt. The ChatGPT chat window has no Mermaid renderer built in. It can produce raster images through its image model, but those come out as flat pictures with garbled text in the boxes and no way to move a node or fix a typo. For anything that has to live in a design doc, a README, or a slide, the Mermaid path is the right one — you just need something on the other end that turns the syntax into an actual diagram. That is what this ChatGPT Mermaid fixer is for: paste what ChatGPT gave you, see it rendered, then edit it directly.
To get Mermaid worth pasting, be explicit in your prompt. Something like: "Output only Mermaid code in a single code block. Use flowchart TD. No explanation before or after. Keep node labels under six words and avoid parentheses, colons and quotation marks inside labels." The last constraint matters more than it looks — unescaped punctuation inside a label is the single most common reason a model's Mermaid fails to parse.
Four mistakes show up again and again in model-generated Mermaid, and they are worth recognising on sight. First, punctuation inside node labels: a label like A[Check user (admin?)] breaks the parser, and it needs quotes around the text. Second, invented arrow syntax — real Mermaid has a fixed set of arrows per diagram type, and models occasionally reach for one that belongs to a different type. Third, mixing diagram types in one block, such as sequence-diagram arrows inside a flowchart. Fourth, a stray prose sentence left above or below the code fence. When you paste here, the renderer reports the failing line instead of showing a blank canvas, and you can fix it in place — or hand the diagram to Chat mode and describe the change in words.
Once it renders, everything downstream is normal editing. The split view keeps the source on one side and the diagram on the other, so a change to either shows up immediately. Export SVG for docs and slides, PNG for chat and tickets, or copy the Mermaid back out to commit alongside your code. If you would rather skip ChatGPT entirely, the same page will generate the diagram from a plain-English description — the prompts in the examples above are exactly the kind of thing that works.
A note on names: text2diagram is an independent tool and is not affiliated with, endorsed by, or sponsored by OpenAI. ChatGPT and GPT are trademarks of OpenAI. This page describes how to render diagram syntax produced by ChatGPT and other language models; it does not use OpenAI's branding and does not claim any connection to it.
| Step | In the ChatGPT window | On this page |
|---|---|---|
| Turning a description into Mermaid | Strong — this is the part it is good at. Describe the flow in plain English and it writes Mermaid that is usually close to correct. | Same job, built in. But if ChatGPT already wrote the code, skip this step entirely and paste it. |
| Seeing the actual picture | The chat shows Mermaid as a fenced code block. The window renders Markdown, not diagrams, so you read the syntax instead of looking at the shape. | The canvas draws it as the code lands. No copy step, no third tool in between. |
| Finding out the code is broken | The block looks fine either way. A missing bracket and a valid diagram are visually identical until something tries to render it. | You find out immediately: it either draws, or the preview says it could not. |
| Fixing a syntax error | Paste the error back and ask again. Sometimes it patches the one line; sometimes it returns a rewritten diagram with different node names. | The error names the line it failed on and points at the character. The source sits in an editor beside the canvas, so you change that line and it re-renders as you type, with the rest of the diagram untouched. |
| Changing one node | You describe the change and get a whole new diagram back, including the parts you were already happy with. | Edit that line directly, or ask in Chat mode for a targeted change to the diagram already on the canvas. |
| Getting a file out | Not available in the chat window. You copy the code out and go find something that renders it. | SVG, PNG, or the Mermaid source, from the preview status bar. |
Not affiliated with, endorsed by, or sponsored by OpenAI. ChatGPT is a trademark of OpenAI. This table describes two halves of one workflow rather than two competing products — the Mermaid that ChatGPT writes still needs somewhere to render, and that is the gap this page fills. Behaviour described in the left column reflects the ChatGPT web interface at the time of writing.
Not sure how to phrase your prompt? Chat mode lets AI ask 2-3 clarifying questions about actors, events, and edge cases — then draws.
Read our in-depth tutorials — symbols, structures, 9 rules, and copy-paste prompt templates for real-world flows.
Describe anything in plain text. Get the diagram type that fits — no need to know which one you want first.
Chat with AI to draw diagrams — no syntax, no guessing at the details.
Describe a process in plain English. Get a diagram. Export SVG or PNG.
Turn an API description into a sequence diagram with actors and arrows.