Visualizers

Mermaid Diagrams in Markdown

Write a diagram here, check that it renders, then copy it as a Markdown block for your README, wiki or docs.

  • Runs in your browser
  • Instant results
  • Free, no sign-up
Loading the tool…

How to use the Mermaid Live Editor

  1. Write or paste your Mermaid diagram and fix any error the preview shows.
  2. Choose "Copy Markdown" to copy it inside a ```mermaid code block.
  3. Paste the block into a .md file on GitHub, GitLab or any tool that renders Mermaid.

Frequently asked questions

Does GitHub render Mermaid in Markdown?

Yes. GitHub draws any ```mermaid code block in README files, issues, pull requests, discussions and wikis. GitLab, Bitbucket, Notion, Obsidian and many docs generators do too.

Why does my Mermaid block show as plain code?

The tool may not support Mermaid, the block may not start with ```mermaid, or the diagram has a syntax error. Paste it here first; the preview shows the line with the problem.

Which diagram types work in Markdown?

All of them, as long as the renderer's Mermaid version supports the type. Flowcharts, sequence, class, state, ER and Gantt diagrams work almost everywhere.

Can I preview Markdown with Mermaid diagrams?

Yes. Our Markdown Preview draws ```mermaid blocks next to the rest of your document.

Syntax cheat sheet

CodeWhat it does
```mermaidOpen a Mermaid code block in Markdown
flowchart LR ...The diagram, exactly as in the editor
```Close the code block
:::mermaid ... :::The block style some wikis use (Azure DevOps)

Practice Python with coding challenges

Solve hands-on problems right in this editor: run the sample tests, submit, and get an AI code review.

All Python challenges
Easy

Rectangle Perimeter

Compute the perimeter of a rectangle from its sides.

You'll learn ArithmeticReturn values
BeginnerLearning-pathVariables
Easy

Distance Between Points

Compute the straight-line distance between two points.

You'll learn Pythagorean theoremSquare roots
BeginnerFunctionsLearning-pathmath
Easy

Average of Three

Average three whole numbers.

You'll learn ArithmeticDivision
BeginnerLearning-pathVariables
Easy

Prime Number Check

Decide whether a number is prime.

You'll learn DivisibilityLoop optimization
BeginnerLoopsNumbersStudent-beginner
Easy

Dot Product of Two Vectors

Multiply two vectors element by element and add the results: the core operation of every neuron.

You'll learn VectorsDot product
Neural networksaimachine learning
Easy

Days in a Month

Return how many days a month has, including leap years.

You'll learn Calendar rulesHelper functions
BeginnerConditionsFunctionsLearning-path
Easy

Count Uppercase Letters

Count the capital letters in a text.

You'll learn Character checksCounting
BeginnerLearning-pathStrings
Easy

Celsius to Fahrenheit

Convert a temperature from Celsius to Fahrenheit.

You'll learn FormulasOperator precedence
BeginnerLearning-pathVariables
Easy

Min and Max Together

Find the smallest and largest value in one pass.

You'll learn Single passMultiple return values
ArraysBeginnerFunctionsLearning-path
Easy

Largest of Three

Pick the largest of three numbers without a built-in max.

You'll learn ComparisonsCombining conditions
BeginnerConditionsLearning-path
Easy

Swap First and Last

Exchange the first and last items of a list.

You'll learn List indexingSwapping
ArraysBeginnerLearning-path
Easy

Password Rules Check

Check a password against simple strength rules.

You'll learn ValidationBoolean flags
BeginnerConditionsLearning-pathStrings