Mermaid to PDF Converter

Download your Mermaid diagram as a PDF that is ready to print, attach to an email or add to a report. The page size matches the diagram, so there are no empty margins to crop.

Try it

Edit the code; the preview updates as you type.

Open in editor

Rendering diagram…

Free Mermaid to PDF export, no watermark

The conversion happens in your browser. Export is free, has no watermark and does not need an account.

How to convert Mermaid to PDF

  1. Paste your Mermaid code into the playground above, or edit the example. The preview updates as you type.
  2. Check the preview. If the code has a syntax error, the message names the line that failed.
  3. Click PDF in the playground to download the file. The PDF uses the scale last chosen in the editor’s Export menu (3x by default).
  4. The file downloads straight from your browser. Your code is not uploaded anywhere.

Example Mermaid code

The playground above starts with this diagram. Replace it with your own code, or paste it into any tool that renders Mermaid.

gantt
  title Report schedule
  dateFormat YYYY-MM-DD
  section Draft
  Collect data   :done, a1, 2026-03-02, 4d
  Write report   :active, a2, after a1, 5d
  section Review
  Feedback       :a3, after a2, 3d
  Print and send :milestone, after a3, 0d

PDF export options

OptionWhat it does
Page sizeMatches the diagram, in landscape or portrait.
ScaleHigher scales give sharper text when printed or zoomed.
BackgroundPDFs always use a solid background so they print cleanly.

When to choose PDF

  • Printing
  • Email attachments and reports
  • Assignments and theses
  • Archiving a diagram with a fixed layout
FormatBest for
PNGSlides, documents, chat and email; up to 4x for sharp text
SVGWebsites, design tools and large prints; scales without blur
PDFPrinting, attachments and reports; page sized to the diagram

Tips for a better PDF

  • For the sharpest print, set the scale to 3x or 4x before exporting.
  • Very large diagrams are scaled down to fit the maximum PDF page size.
  • The diagram is embedded as a high-resolution image so every language and font looks the same as in the preview. If you need selectable vector text, export SVG.
  • To put several diagrams in one document, export each one and combine them in your PDF tool or word processor.

Frequently asked questions

Is the PDF export free?

Yes. PDF export is free, adds no watermark and needs no sign-up.

What page size does the PDF use?

The page is the size of the diagram itself, so nothing needs cropping. Large diagrams are scaled to fit the maximum PDF page size.

Is the text in the PDF selectable?

No. The diagram is embedded as a high-resolution image so fonts and non-Latin text look exactly like the preview. Export SVG when you need vector text.

Is my diagram uploaded to create the PDF?

No. The PDF is generated in your browser.