JSON Tree Viewer

Paste JSON and read it as a tree you can collapse, rather than as a wall of brackets. The first three levels open automatically and everything deeper stays folded, so a large document gives you an overview instead of a flood. Values are coloured by type and each node knows its own path. The part worth the visit is the error reporting: when the JSON is broken, you get the exact line and column, and you get the same answer whichever browser you are in. That is less common than it sounds, because browsers describe parse failures in several incompatible formats and some give no position at all, so tools that repeat the engine's message point at the right character in one browser and at line 1 in another. This scans the document itself. Nothing is uploaded.

Mistakes that are valid JavaScript but invalid JSON

WrittenProblem
{"a": 1,}Trailing comma before the closing brace
{'a': 1}Single quotes — JSON requires double
{a: 1}Unquoted key
{"a": 1 "b": 2}Missing comma between members
{"a": .5}Number must have a digit before the point
{"a": 01}Leading zeros are not allowed
// commentJSON has no comments at all

When to use it

  1. Explore an unfamiliar API response without scrolling through brackets.
  2. Find the exact character that makes a config file invalid.
  3. Check the shape and depth of a document before writing code against it.
  4. Confirm whether a field exists and what type it holds.
  5. Read a minified JSON payload that has no line breaks at all.

How to Use

  1. Paste or type your JSON.
  2. If it is invalid, read the line and column and fix that character.
  3. Click a node to expand or collapse that branch.

Features

  1. Collapsible tree with the first three levels open
  2. Exact error line and column, identical in every browser
  3. Catches trailing commas, single quotes and unquoted keys precisely
  4. Values coloured by type, long strings truncated
  5. Node count for the whole document
  6. 100% client-side

FAQs

Is my JSON uploaded?

No. It is parsed and rendered in your browser. API responses and config files routinely carry tokens, internal hostnames and customer data, so this is not a small point.

Why do other validators point at a different place?

Because most repeat whatever the browser's own error message said, and those differ between engines and versions — some give a character offset, some a line and column, and some only a snippet with no position. This scans the document directly, so the position is the same everywhere and is the first character that genuinely breaks the grammar.

What are the most common causes of invalid JSON?

A trailing comma before a closing brace or bracket, single quotes instead of double, unquoted keys, and a missing comma between two members. All four are legal in JavaScript object literals, which is exactly why people write them by mistake.

Can it handle a large file?

Yes, though a very large document will make the browser work. Deeper levels stay collapsed until you open them, which keeps the initial render manageable.

Are comments allowed in JSON?

No. JSON has no comment syntax at all, which surprises people coming from JSONC or JSON5. A // or /* */ will be reported as a syntax error at the slash.

Technical Details

The document is parsed into a tree where every node carries a stable JSONPath, so any value on screen can be pointed at unambiguously. Where this differs from most viewers is the error reporting. Browser engines describe a parse failure in at least three incompatible ways — V8 alone gives a character offset in some cases, a line and column in others, and in a third case only a snippet of surrounding text with no position at all — and which one you get depends on the error and the browser version. Scraping those messages produces a tool that points at the right character in Chrome and at line 1 in Safari. Instead the document is scanned here with a small JSON reader that walks values, strings, numbers and literals directly, and reports the offset of the first character that actually violates the grammar. That offset is converted to a line and column against the source text, so the answer is identical in every browser and correct for the cases people hit constantly: a trailing comma, a single-quoted key, an unquoted key, a missing comma between members, a raw newline inside a string, a malformed unicode escape, or a number written in a form JSON does not allow such as a leading zero or a bare .5. The tree opens the first three levels and leaves deeper branches collapsed, because a fully expanded large document is noise rather than an overview. Values are coloured by type and long strings truncated in the row. Nothing is uploaded.

Developer Tools

Developer Tools

  • JSON Flattener
  • JSON Diff Checker
  • JSONPath Extractor
  • JSON Schema Generator
  • License Generator
  • Nanoid Generator
  • Random String Generator
  • Test IBAN Generator