🌳

JSON Visualizer

Visualize JSON data as an interactive tree. Format, minify, and analyze your JSON with statistics. Embeddable on developer blogs.

Explore JSON as an indented tree or formatted text, with recursive counts that help explain the document's structure.

Data workspace

Explore JSON as an indented tree or formatted text, with recursive counts that help explain the document's structure.

Method and limits

Objects and arrays are containers; keys count object properties only. Strings, numbers, booleans and nulls count primitive values. Depth is the greatest number of edges from the root, whose depth is zero. Tree and raw views use the same parsed value.

Null, false and zero are valid JSON roots. An empty editor has no result. The viewer does not validate a schema, fetch referenced URLs or execute HTML inside strings. Duplicate keys and numeric precision follow JavaScript's JSON parser.

These transformations run in your browser. The tool does not submit the editor contents to a conversion service. This describes the tool operation, not the site's advertising or account policies.

Try this example

{"a":1,"b":true} has 2 keys, 1 object, 1 number, 1 boolean and depth 1; other type counts are zero. null has one null value and depth 0.

❌

                
⚠️
Invalid JSON
Keys
Strings
Numbers
Booleans
Null values
Arrays
Objects
Depth

JSON Visualizer

Objects and arrays are containers; keys count object properties only. Strings, numbers, booleans and nulls count primitive values. Depth is the greatest number of edges from the root, whose depth is zero. Tree and raw views use the same parsed value. Null, false and zero are valid JSON roots. An empty editor has no result. The viewer does not validate a schema, fetch referenced URLs or execute HTML inside strings. Duplicate keys and numeric precision follow JavaScript's JSON parser.

Copied

Copy failed. Select the result and copy it manually.

Embed this tool on your website

Use whole pixel dimensions from 1 to 4096.

× px (1–4096)

                        

💡 Integration Tip

Copy the embed code and paste it into your website HTML. The responsive version adapts to all screen sizes automatically.

2 ratings
✓

Popular Tools

No more tools to show
Explore All Tools

About JSON Visualizer

Explore JSON as an indented tree or formatted text, with recursive counts that help explain the document's structure.

{"a":1,"b":true} has 2 keys, 1 object, 1 number, 1 boolean and depth 1; other type counts are zero. null has one null value and depth 0.

Null, false and zero are valid JSON roots. An empty editor has no result. The viewer does not validate a schema, fetch referenced URLs or execute HTML inside strings. Duplicate keys and numeric precision follow JavaScript's JSON parser.

Use Cases

A developer who has just curled an API pastes the response body in and reads the Depth and Arrays counters to see how deeply the payload nests before writing any code to walk it.
A QA engineer comparing two fixtures presses Minify on each one so both collapse to a single line, then diffs those lines instead of fighting whitespace differences in a diff tool.
Someone debugging a failed deployment pastes a config file that a parser rejected and reads the red error line to find the trailing comma or unquoted key that JSON.parse objects to.
A technical writer preparing a code sample pastes hand-typed JSON, presses Format for consistent two-space indentation and Copy, and drops the normalised block straight into the documentation.
A student learning the format loads the Nested Data sample and watches the Keys, Objects and Depth counters change as they edit it, which makes the difference between an array and an object concrete.

How to use

1

Paste JSON or choose a sample, then switch Tree and Formatted JSON. Format or Minify changes the input layout; Copy always copies formatted JSON.

Pro Tips

  • No. Keys count only object properties. Array elements contribute their own type and depth counts, including nested containers.
  • It removes input whitespace between JSON tokens. The parsed tree and recursive counts remain the same; formatted copy still uses indentation.

Troubleshooting

Problem:

The Format, Minify and Copy buttons do nothing when clicked.

Solution:

All three parse the input before acting and swallow the error when it fails, so an invalid document makes them silent. Look at the input box: if it has a red border there is an error message under it naming the position to fix.

Problem:

The tree does not update straight away while typing.

Solution:

Parsing is debounced by 300 milliseconds so the tree is not rebuilt on every keystroke. Stop typing for a moment and it catches up; if it still does not, the document is invalid and the right pane keeps the last valid parse.

Problem:

A config file that my editor accepts is rejected here.

Solution:

Editors often accept JSON with Comments or JSON5, which allow comments, trailing commas and unquoted keys. This page uses strict JSON.parse. Remove the comments and the trailing comma, and put double quotes around every key, or paste only the strict-JSON part of the file.

Problem:

The page becomes unresponsive for a moment after pasting a big payload.

Solution:

Parsing, tree rendering and the statistics walk all run on the main thread, so a multi-megabyte document blocks the interface while it works. Wait for it to finish, or paste a representative slice rather than the whole export.

Frequently Asked Questions

No. Keys count only object properties. Array elements contribute their own type and depth counts, including nested containers.

It removes input whitespace between JSON tokens. The parsed tree and recursive counts remain the same; formatted copy still uses indentation.

FreeWebTools AI