Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text
20 comments
·May 21, 2025smusamashah
andrewl
I like Mermaid fine, but nothing is perfect. I will look at your list. The tool I always wanted would let me paste in the SQL of my database schema and output a diagram of the tables and relationships. That's SQL and not Markdown or JSON or any other format.
Note that DrawDB (www.drawdb.app) does this, although it does not yet handle views. But I have been happy with what it offers so far. Still, I would welcome suggestions of other tools.
NightMKoder
IMO mermaid is awesome, but for two somewhat indirect reasons:
- There’s an almost wysiwig editor for mermaid at https://www.mermaidchart.com/play . It’s very convenient and appropriately changes the layout as you draw arrows!
- Notion supports inline mermaid charts in code blocks (with preview!) It’s awesome for putting some architecture diagrams in Eng docs.
LifeIsBio
One of my favorite applications of multimodal LLMs thus far is the ability to:
1. Draw a DAG of whatever pipeline I’m working on with pen and paper.
2. Take a photo of the graph, mistakes and all.
3. Ask ChatGPT to translate the image into mermaid.js
Given how complicated the pipelines are that I’m working with and the sloppiness of the hand drawn image, it’s truly amazing how well this workflow works.
codazoda
Care to share your prompt(s)?
I draw a fair bit on a Kindle Scribe. I’d love to try this, but I bet your prompt would be helpful.
cogogo
Little weird to see this on the lead page… mermaid has been around for a long time. And in general I’ve found its real world use pretty lacking.
prepend
I use it and see it many times per month as it’s the preferred way of sticking graphics and diagrams in markdown in git repos and generated static sites.
It’s so handy for putting a sequence diagram in your docs and then tracking the changes over time using git.
I’m curious what other software developers use if not this. I’ve tried specific graph and drawing tools like lucid and Visio, but the simplicity of mermaid is nice. And I don’t know anything else that shows git blame for who changed what in my diagram, when.
billyp-rva
> And I don’t know anything else that shows git blame for who changed what in my diagram, when.
You could do this with any diagrams-as-code tool, no?
_tom_
I think he's saying you can click and edit on the diagram, which mermaid doesn't support. This does propagate back into the source.
I think you are talking about "just change the text and regenerate", which achieves much the same goal.
I'm not sure in what cases the former is better.
matthew16550
Mermaid is sort of a defacto standard because github auto renders it inside markdown files.
wadewatts
I love Mermaid diagrams. I let my coding LLMs generate diagrams during architecture design and then afterward for accuracy— Sequence Diagrams, CSD’s, Flowcharts, DFDs, and ERDs. Couldn’t be simpler. I’m happy.
kacesensitive
i have been quite enjoying https://www.eraser.io/diagramgpt
behnamoh
I liked Mermaid but unfortunately LLMs don't understand it well, so I switched to Latex tikz which LLMs know pretty well. At least I know Gemini 2.5 Pro does a good job at tikz. 3.7 and o1 were meh.
jagged-chisel
Like PlantUML?
aeonik
Except it has trouble rendering text on the CLI version when producing SVGs.
mdaniel
Nicer looking but fewer diagram types
Also, AFAIK, their "render locally" story is "boot up headless chrome, good luck" which isn't great
gertlex
Another comment mentioned along the lines of, "it's the goto used by developers in readmes", and I suspect it's more specifically javascript-adjacent developers (as is the case where I work)
The "render locally" situation was enough friction to keep me happy with my .jpgs and .pngs generated from various sources and/or screenshotting.
mdaniel
I don't know if this helps you but the Mermaid plugin in JetBrains has an export feature which can save you a step. But I find Mermaid diagrams so limiting and the syntax more immature than PlantUML so it's very rare that I bother
The "in readmes" is a special case because the markdown rendering in both GitHub and GitLab support it without drama
I have an almost exhaustive list [1] of browser based text to diagram tools. Some specialised tools (like https://sequencediagram.org/) so much better at what they do than any generic ones like mermaid.
[1] https://xosh.org/text-to-diagram/