Mermaid → PNG / PDF
Mermaid diagrams to images, via API
Send Mermaid diagram syntax — flowcharts, sequence diagrams, ERDs, Gantt charts — and get back a crisp, high-resolution PNG or a vector-quality PDF. No CLI, no browser, no local Mermaid setup.

POST /api/v1/render · type: "diagram" · format: "png" · dimensions: "1200x800"Everything Mermaid supports, delivered as a portable image
All Mermaid diagram types
Flowcharts, sequence diagrams, class diagrams, ERDs, Gantt charts, state diagrams, and more — anything valid Mermaid syntax renders correctly.
PDF output is vector-quality
The PDF path embeds the Mermaid-compiled SVG directly rather than rasterizing it — sharp at any zoom level, ready for documentation, print, or slide decks.
No Mermaid.js setup on your server
Mermaid requires a real browser environment to run — jsdom and canvas polyfills are fragile and maintenance-heavy. This API handles all of that; you just send the syntax.
How it works
- 1
Write your diagram in Mermaid syntax
Standard Mermaid syntax works as-is. Flowchart shorthand (nodes without a header line) is auto-prefixed so you don't need to remember the boilerplate.
- 2
POST the syntax to the render endpoint
Pass type: "diagram", your Mermaid source, and the desired output format and dimensions.
curl -X POST https://renderfy.io/api/v1/render \ -H "Authorization: Bearer rfy_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "diagram", "content": "flowchart TD\n A[User] --> B(API Gateway)\n B --> C[Auth Service]\n B --> D[Render Service]\n D --> E[(Storage)]", "options": { "format": "png", "dimensions": "1200x800" } }' \ --output diagram.png - 3
Embed in docs, wikis, or slide decks
A portable PNG or PDF that renders correctly in Confluence, Notion, GitHub, Google Slides, or any Markdown-based doc tool — no Mermaid plugin required at the destination.
Frequently asked questions
Which Mermaid diagram types are supported?+
Flowcharts, sequence diagrams, class diagrams, entity-relationship diagrams, Gantt charts, state diagrams, pie charts, and user journey diagrams — the full Mermaid v10 feature set.
My diagram has a lot of nodes — will it still render clearly?+
Yes. The output dimensions are configurable, and the renderer fits the diagram to the target box preserving its aspect ratio — so a dense 30-node diagram gets the same crisp output as a simple 3-node one.
Why is the PDF output better than PNG for technical diagrams?+
PDF embeds the diagram as a native SVG, which is resolution-independent — it stays sharp whether it's viewed at 50% zoom or printed on A3. The PNG path is a high-DPI raster screenshot, which is good for web embedding but will pixelate when scaled up significantly.
Can I generate diagrams from code that builds the syntax programmatically?+
Yes. The content field is just a string — build the Mermaid syntax programmatically in your backend (from a database schema, an API graph, a dependency tree) and pass the resulting string. No Mermaid library needed on your side.
More ways to use the API
Render your first diagram as an image today
Sign up, mint an API key, and convert your first Mermaid diagram to PNG in under 5 minutes — 100 free credits included, no card needed.