Convert Mermaid to PDF

Paste your Mermaid code below and download it as a PDF document — free, instant, and entirely in your browser. Nothing is uploaded, and no account is needed.

Runs in your browser — your code is never uploaded.

Open in editor

PDF is the format for anything that gets printed, attached, or formally reviewed: architecture documents, audit artifacts, and reports. The page is sized to your diagram automatically (landscape or portrait), so there's no awkward cropping.

How it works

  1. Paste (or write) your Mermaid code in the editor — the preview renders live.
  2. Check the preview. If you see a syntax error, fix the highlighted line or open the code in the full editor and use AI repair.
  3. Click “Download PDF”. The diagram is rendered at 2× resolution onto a page matched to its dimensions.

Frequently asked questions

How do I convert a Mermaid diagram to PDF?
Paste your Mermaid code into the converter above and click Download PDF. The diagram is rendered with Mermaid.js in your browser, rasterised at 2× resolution, and placed on a PDF page sized to the diagram — no signup or upload required.
Is this converter free?
Yes, the converter is free and requires no account. If you want to keep editing the diagram, the 'Open in editor' button takes the same code into MermaidCreator's free visual + code editor.
Is my diagram uploaded to a server?
No. The conversion runs entirely in your browser: Mermaid.js renders your code to SVG locally and the download is produced on your machine. Your diagram code never leaves your computer.
What page size does the PDF use?
The PDF page is sized to the diagram itself: wide diagrams produce a landscape page and tall diagrams a portrait page, with the image filling the page exactly. This avoids the white margins and cropping you get from forcing diagrams onto A4 or Letter.

More free Mermaid tools

Need to change the diagram, not just convert it?

MermaidCreator is a full Mermaid editor: drag nodes visually, edit the code, or let AI restructure it — then export from there.

Open the free editor