Skip to content
MermaidViewer

Mermaid to PDF converter

Export Mermaid diagrams as vector PDFs that stay sharp when printed or zoomed — sized automatically to fit your diagram.

Open in full editor

How to convert Mermaid to PDF

  1. Paste your Mermaid code above.
  2. Choose a theme and background.
  3. Click Download PDF. The page is sized to the diagram with a small margin.

When to use PDF

PDF is perfect for specs, architecture reviews, printed handouts and attaching diagrams to formal documents. Because the export is vector-based, it prints crisply at any size and the text remains selectable.

Good to know

  • The PDF is generated locally in your browser using vector drawing — no screenshots.
  • Very wide diagrams produce a landscape page automatically.
  • To combine several diagrams in one document, export each and merge them, or paste PNGs into your doc tool.
  • Prefer an image? Try Mermaid to PNG or Mermaid to SVG.

Frequently asked questions

Is the PDF vector or raster?

Vector. Shapes and text are drawn as PDF paths and text, so they stay sharp at any zoom level.

What page size is used?

The page is sized to fit the diagram plus a small margin, in portrait or landscape automatically.

Do I need an account?

No. The converter is free and runs entirely in your browser.

More free tools