- Executors
-
Learn
Learn Python Runnable examples, NumPy, pandas, and more Learn AI / Machine LearningNeural networks, ML and LLMs from scratch Learn C & C++ Pointers, memory, STL, and modern C++ Learn C#C# basics, OOP, LINQ, async, and .NET exercises Learn MatplotlibLine, bar, scatter and pie charts with live visualizers Learn RustOwnership, traits, error handling, and threads Learn GoSlices, interfaces, goroutines, and channels Python Algorithms Search, sorting, recursion, and visualizers O(n) C & C++ Algorithms Compare algorithms implemented in C and C++ Coding for Kids Learn to code by playing!
- QuizzesNew
- ChallengesNew
- For TeachersNew
- Updates
- Buy me a coffee
Visualizers
Mermaid Flowchart Editor
Draw flowcharts from text. Start from the example, check the syntax below, or paste code and let AI turn it into a flowchart.
- Runs in your browser
- Instant results
- Free, no sign-up
Loading the tool…
How to use the Mermaid Live Editor
- Edit the example or paste your own flowchart. Use TD (top-down) or LR (left to right) on the first line.
- Add nodes like A[Box], B{Decision} and C((Circle)), and join them with --> or -->|label|.
- Download SVG or PNG, copy the Markdown block for GitHub, or copy a share link.
Frequently asked questions
How do I make a flowchart in Mermaid?
Start with "flowchart TD", then write one connection per line, for example "A[Start] --> B{Is it valid?}" and "B -->|Yes| C[Save]". Each node gets an id (A, B, C) the first time it appears with its shape and label; after that you can use the id alone.
Can AI turn my code into a flowchart?
Yes. Paste Python, Java, C++, JavaScript or other code in the "Code to flowchart" box and AI writes a Mermaid flowchart of its steps, decisions and loops. In our online code editors the Flowchart button does the same for the code you are running.
What is the difference between graph and flowchart?
"graph" is the older keyword and "flowchart" the newer one. Both draw the same diagrams, but only "flowchart" supports the newer arrow types and features, so prefer it.
How do I put a flowchart in a GitHub README?
Copy the Markdown block (a ```mermaid code block) and paste it into any Markdown file. GitHub, GitLab and many wikis draw it as a diagram.
Syntax cheat sheet
| Code | What it does |
|---|---|
flowchart TD | Start a flowchart, top to bottom (LR, RL and BT also work) |
A[Text] | A box (rectangle) with an id and a label |
B{Question?} | A decision (diamond) |
C([Start]) D((End)) | A rounded "stadium" shape and a circle |
A --> B | An arrow from A to B |
A -->|Yes| B | An arrow with a label |
A -.-> B A ==> B | A dotted arrow and a thick arrow |
subgraph Name ... end | A group of nodes in a box |
%% comment | A comment, not drawn |
Practice Python with coding challenges
Solve hands-on problems right in this editor: run the sample tests, submit, and get an AI code review.