Skip to the tool
GigaJSON

JSON to Mermaid

All tools
Format and check
View and query
Convert
JSON to code
Encode and decode
Sample files
Guides Open GigaJSON
Input JSON
Output Mermaid

The Mermaid output appears here as you type.

Ready Runs in your browser

Paste JSON or open a file to get Mermaid code and the diagram it draws. Flowchart shows the document itself: a box for each value and an arrow from each object or list to what it holds. Class diagram shows the shape of the data: one class per kind of object, with its fields, their types and arrows between classes, inferred the same way as JSON to TypeScript. Paste the code into a GitHub README, GitLab, Notion or Obsidian, which draw Mermaid for you, or download the diagram as SVG. For an interactive graph of a big file, use the JSON Visualizer.

How to convert JSON to a Mermaid diagram

  1. Paste JSON, open a file, or load the example.
  2. Choose Flowchart or Class diagram. The diagram is drawn as you type.
  3. Copy or download the Mermaid code, save the diagram as SVG, or open it in mermaid.live to keep editing.

Private, and made for big files

This tool runs in your browser, in a background worker: nothing you paste or open is uploaded, and nothing is kept after you leave. JSON and XML input can be up to 1 GB, depending on available memory. Processing runs in a background worker; large analyses can take a minute or more. Already loaded features keep working if your connection drops. Loading another tool or jq for the first time needs a connection. When one tool isn't enough, GigaJSON opens your data with a tree, a table, JSONPath/JMESPath/jq queries, transforms, diff and history.

JSON to Mermaid questions

What is Mermaid?

A text format for diagrams. You write lines such as A --> B, and GitHub, GitLab, Notion, Obsidian and mermaid.live draw the diagram. In Markdown, the code goes in a code block marked mermaid.

Flowchart or class diagram?

The flowchart draws the values in your document, so it suits small examples, config files and API responses you want to explain. The class diagram draws the structure, so a list of 10,000 orders becomes one Order class. Use it to document an API or a data model.

How do I add the diagram to a GitHub README?

Copy the code. In the README, write ```mermaid on its own line, paste the code below it, and close the block with ```. GitHub draws the diagram when it shows the file.

How large can the JSON be?

Files up to 1 GB open, but the diagram stays small enough to read. The flowchart shows up to 20 entries of each object or list (the rest as one "… N more" box) and 200 boxes in all, level by level. The class diagram infers types from a list's first 1,000 items.

Does "Open in mermaid.live" upload my data?

It opens mermaid.live with the diagram's code in the link, so that site gets the diagram, not the rest of your file. Everything else on this page runs in your browser. For private data, use Copy or SVG instead.

Is my data uploaded?

No. The tool runs in your browser, in a background worker. Nothing you paste or open goes to a server, and nothing is kept after you leave the page.

All tools