Mermaid diagram to PDF converter
Write flowcharts, sequence diagrams and more as text in a Markdown file, and get a PDF where they are drawn as real diagrams.
How to use the Mermaid to PDF converter
- Paste your Markdown with a mermaid code block.
- Choose PDF and convert.
- Download the PDF with your diagrams drawn inside it.
What stays intact
- Flowcharts and sequence diagrams
- Class, state, pie and Gantt charts
- Diagrams scaled to fit the page
- The text around your diagrams
- A text copy of any diagram that cannot be drawn
About the Mermaid to PDF converter
How to write a diagram
Start a code block with three backticks followed by the word mermaid, write your diagram on the lines below, and close the block with three backticks. For example, a line reading A --> B inside a flowchart block draws an arrow between two boxes.
Where the drawing happens
Diagrams are drawn in your own browser before the file is sent, because drawing needs a browser engine. The finished pictures are then placed in the PDF at the right position, with the headings around them kept together on the same page.
If a diagram has a mistake
A diagram with a syntax error is kept as a code block in the PDF and you see a warning, so one typo never stops the rest of the document converting.
Large diagrams
A diagram taller than a page is scaled down to fit, so it is never cut off. Choose A4 or US Letter before converting.
Diagrams come out as real pictures
Write Mermaid in your Markdown. Every flowchart, sequence diagram and chart is drawn in your browser and placed in the PDF, Word or HTML file as a sharp image, so readers see the diagram, not the code.
Supported: flowcharts, sequence, class, state and ER diagrams, pie and Gantt charts, mind maps, timelines and every other Mermaid type.
Frequently asked questions
- Which diagram types work?
- Flowcharts, sequence diagrams, class diagrams, state diagrams, pie charts, Gantt charts and the other common Mermaid types.
- Why is my diagram shown as code?
- Its syntax has an error, so it could not be drawn. The code is kept in the PDF and a warning appears so you can fix it.
- Is my diagram sent anywhere to be drawn?
- No. It is drawn in your browser, and the finished picture is sent with your document only to create the PDF.