---
title: "Mermaid Viewer – Render Mermaid Diagrams Online – Display"
description: "Paste Mermaid code to see the diagram. Flowcharts, sequence, class, state and Gantt diagrams. Download SVG or get a link. Free, runs in your browser."
---

# Mermaid viewer

Paste Mermaid code to see the diagram, in a light or a dark theme. Download the diagram as SVG, or get a link to a page that shows it.

Open the tool: https://display.dev/tools/mermaid-viewer

## How to use the Mermaid viewer

1. Paste Mermaid code into the source box, or drop an .mmd file on it. To see how the tool works, select Load an example.
2. Read the diagram in the diagram pane. The diagram changes when you stop typing. Select Dark to see it in the dark theme.
3. If the code has an error, the diagram pane shows the Mermaid error message and the line.
4. Select Download SVG to save the diagram as an image file.
5. To send the diagram to someone, select Get a link. Display publishes a Markdown document with your diagram and gives you a URL and a claim link.

### Get a link without the browser

Agents can publish the same file through the anonymous endpoint that the Get a link button uses. The response holds a preview URL, a single-use claim URL and the expiry date.

```bash
curl -X POST https://api.display.dev/v1/public/artifacts -F file=@document.md
```

## Limits

- The tool renders and publishes up to 5 MB of Mermaid code. For files up to 50 MB, publish with the Display CLI.
- The tool uses Mermaid 11.16.1, the same version that draws diagrams on published Display pages.
- Mermaid runs with its strict security level in a sandboxed frame. Click actions and HTML in node labels do not work.
- Download SVG saves the diagram in the theme that you see. The tool does not make PNG files.
- Get a link makes a public link. Anyone with the URL can open it for 30 days. Search engines do not index it.

## Mermaid viewer questions

**Q: Does the Mermaid viewer send my diagram to Display?**

No. Mermaid draws the diagram in your browser. Display receives the code only when you select Get a link.

**Q: Which diagram types work?**

All diagram types in Mermaid 11.16.1, for example flowcharts, sequence, class, state, entity relationship, Gantt, pie and mindmap diagrams.

**Q: What does the published page show?**

A Markdown document with one Mermaid code block. Display draws the block as a diagram, in light or dark to match the reader's setting. To add notes next to the diagram, publish the code block in a Markdown file from the Markdown viewer.

**Q: How long does the link work?**

30 days. Open the claim link and sign in to keep the diagram in your Display organization. After you claim it, you can make it open only for people at your company.

## Related tools

- [Markdown viewer](https://display.dev/tools/markdown-viewer.md): Read a .md file as a formatted document, with tables and code.
- [Markdown to PDF](https://display.dev/tools/markdown-to-pdf.md): Save a .md file as a PDF, with tables and code blocks.
- [All free tools](https://display.dev/tools.md)
