Specs and design docs
Attach a PDF diagram to product specs, ADRs, implementation notes, and architecture reviews without asking reviewers to render Mermaid.
PDF export · docs and print handoff
Paste Mermaid code, preview the rendered diagram, then export a clean high-resolution PDF for documentation, specs, handoff, and print-friendly sharing.
No signup · No watermark · Local browser rendering · High-resolution PDF · Your diagram code stays in your browser
Export controls activate after your diagram renders locally.
PDF is useful when diagrams need to travel through documentation reviews, specs, email attachments, and print-oriented handoff flows where recipients may not accept Mermaid source, SVG, or modern image formats.
Attach a PDF diagram to product specs, ADRs, implementation notes, and architecture reviews without asking reviewers to render Mermaid.
Use PDF when the recipient expects a document-style asset rather than an editable source file or web image.
Create a white-page PDF from the rendered diagram so labels, arrows, and boxes remain readable in document workflows.
One 16-line flowchart, exported from this editor in the Clean Docs style on a white background at 2x. Sizes change with the diagram, but the ratios between formats hold. Every format is free and has no watermark; the Mermaid to image converter exports all five from one preview.
| Format | File size at 2x | Transparent background | Resizing | Best for |
|---|---|---|---|---|
| PNG | 178 KB | Yes | Fixed pixels — pick 2x or 4x | Docs, slides, README files, anywhere |
| JPG | 85 KB | No — filled white | Fixed pixels | Upload forms and tools that only take JPG |
| WebP | 38 KB (54 KB transparent) | Yes | Fixed pixels | Websites and blogs where page weight matters |
| SVG | 147 KB, fonts embedded | Yes | Sharp at any size | Docs sites and pages viewed in a browser |
| 129 KB | No — white page | Page sized to the diagram; 2x or 4x image inside | Attaching, printing, and sending for review |
One page, sized to the diagram rather than to A4 or Letter: the flowchart in the table above becomes a 674 × 272 pt page. The diagram is placed on it as an image rendered at the scale you choose — 129 KB at 2x, 290 KB at 4x — on a white page even when the style is transparent.
Because the diagram is an image, its text cannot be selected or searched inside the PDF. Choose 4x when the PDF will be printed or zoomed, and SVG when you need a vector file. Wide diagrams need the extra pixels most: a sprint plan from the Gantt chart exporter is already almost 3,000 pixels across at 2x, so its day labels are small before the page is even scaled to fit.
This page exports one diagram at a time. To turn a Markdown document that contains Mermaid blocks into a PDF, the diagrams have to be rendered first:
mmdc -i README.md -o README-rendered.md renders each Mermaid block to an SVG file and links it from the output. Convert that file to PDF with your usual Markdown tool.The PDF is created from the rendered diagram at the selected export scale, so 2x is the safe default for normal docs.
Transparent presets are flattened onto a white PDF page for reliable viewing and printing across PDF readers.
Use SVG export when you need editable vector markup. The PDF path prioritizes consistent appearance in document workflows.
FAQ
Yes. Mermaid rendering, rasterization, and PDF creation happen in your browser for the core workflow. Your diagram code is not uploaded for conversion.
No. The PDF is generated from a high-resolution rendered image so it matches the preview consistently. Use SVG export when you need editable vector markup.
PDF export uses a white page background for reliable viewing and printing. Use PNG or WebP when you need transparent image output.
Use 2x for normal documentation and 4x for large diagrams or presentation handoff. If a very large diagram fails, lower the scale or export SVG instead.
Paste the Mermaid code into the converter on this page, pick a style and scale, and click Download PDF. The PDF is built in your browser, with no signup and no watermark.
The page matches the diagram, so there is no empty margin around it. Put it on an A4 or Letter page by inserting it into a document, or by printing it scaled to fit.
Render the diagrams first, then convert the Markdown. The Mermaid CLI (mmdc -i input.md -o output.md) replaces each Mermaid block with a rendered SVG, and the Markdown PDF extension for VS Code renders Mermaid blocks as it exports.