Why You Are Here
An API response is unreadable. Minified JSON arrives as a single line of thousands of characters, and you need to see what is in it.
Something is failing to parse and you need to know where. A trailing comma, an unescaped quote, or a stray character somewhere in a large payload.
You are exploring an unfamiliar structure. A configuration file, a database export, or a response from a service you have not worked with before, where the shape matters more than the values.
What This Tool Does
The JSON Formatter and Tree Viewer formats, validates, and displays JSON as an explorable tree.
Paste JSON and the tool indents it readably, reports any syntax errors with their location, and renders the structure as collapsible nodes you can expand, collapse, and search.
Formatting and Viewing Are Different Jobs
|
Formatting |
Tree view |
|
|
Output |
Indented text |
Interactive nodes |
|
Best for |
Reading, editing, copying |
Understanding structure |
|
Large files |
Still a wall of text |
Collapse what you do not need |
|
Finding a value |
Scroll or Ctrl-F |
Search and expand |
Format when you need to work with the text
Editing, copying a section, or pasting into code.
Use the tree when you need to understand the shape
A deeply nested response is far easier to comprehend as collapsible nodes than as four hundred indented lines.
The Number Precision Problem
This is the most important thing on the page and no competing tool appears to mention it.
That gives exact integers only up to 2 to the power 53 minus 1, which is 9,007,199,254,740,991. Any integer larger than that is silently rounded.
You paste: {"id": 9007199254740993}
Browser parses: 9007199254740992 <- changed, no error
Including this one, because it is a property of JavaScript rather than of any particular tool.
Where it bites in practice
|
Data type |
Risk |
|
Database bigint IDs |
High — commonly exceed 2^53 |
|
Snowflake IDs, as used by several platforms |
High — 19 digits |
|
Financial values in minor units |
Possible on large amounts |
|
Unix timestamps in nanoseconds |
High |
|
Ordinary integers and decimals |
None |
The JSON specification itself has no precision limit
RFC 8259 permits arbitrary-precision numbers, so the JSON is not at fault. The parser is.
How to avoid it
If a value is an identifier rather than a quantity, transmit it as a string. An ID written as a quoted string survives any parser intact, and identifiers are never arithmetic anyway. Where you cannot change the source, verify large numbers against the raw text rather than the parsed view.
Verifying a Tool Really Is Client-Side
Every JSON tool claims complete privacy. Almost none tell you how to check, and at least one popular one behaves differently from what people assume.
One widely used JSON formatter states that data saved without logging in becomes public
Saving is a separate action from formatting, but the distinction is easy to miss, and your data is safe and your saved data is publicly readable can both be true on the same site.
Two ways to verify any tool, including this one
Check the network tab
Open your browser's developer tools, go to Network, clear it, then paste and process your JSON. A genuinely client-side tool makes no requests carrying your data.
Disconnect and try again
Load the page, disconnect from the internet, then use it. If it still works, the processing is happening locally, because nothing else is possible.
JSON payloads are frequently API responses containing production data, access tokens, customer records, or internal configuration. Pasting a live API response into an unverified web tool is a data disclosure, and the fact that it is routine does not make it safe.
Why Your JSON Is Invalid
Three causes account for most parse failures, and all three are things people expect to work.
Comments are not permitted
RFC 8259 defines no comment syntax. Neither double-slash nor slash-star is valid JSON, however common they are in configuration files.
Trailing commas are not permitted
Invalid: {"a": 1, "b": 2,}
Valid: {"a": 1, "b": 2}
Keys must use double quotes
Invalid: {name: 'Ana'}
Valid: {"name": "Ana"}
The pattern is that JSON is not JavaScript
It borrowed JavaScript's object syntax and then deliberately restricted it, so several things that work in a .js file fail in a .json file.
Other frequent causes
|
Problem |
Fix |
|
Unescaped double quote in a string |
Escape it with a backslash |
|
Literal newline inside a string |
Escape it as backslash n |
|
NaN or Infinity |
Not valid JSON, use null or a string |
|
Leading zeros on a number |
007 is invalid, use 7 or a quoted string |
|
A stray trailing character |
Remove it, often a copy-paste artefact |
Duplicate Keys Are Valid but Unpredictable
A subtlety that surprises people and is worth knowing.
A document with the same key twice is technically valid JSON.
"role": "admin", "role": "viewer"}
What happens next is implementation-defined
Most parsers take the last occurrence, some take the first, and some raise an error. Two parsers can legitimately disagree about the same document.
The practical implication
If a value seems wrong and the key appears more than once, the parser is not broken. It made one of several permitted choices. Never rely on duplicate-key behaviour, and treat a duplicate as a bug in whatever produced the document.
Working With Large Files
|
Technique |
Why it helps |
|
Collapse branches you do not need |
Reduces what the browser renders |
|
Search rather than scroll |
Finding a key directly avoids expanding everything |
|
Minify before viewing |
Smaller payload for the parser to handle |
|
Extract a subset first |
A representative slice is usually enough to understand the shape |
Performance depends on your device rather than the tool
Rendering thousands of nodes is browser work, and a large file will feel slower on a phone than on a laptop regardless of implementation.
For genuinely enormous files
A command-line tool that streams rather than loading everything into memory is the better instrument. Browser-based tools are for the sizes people actually paste.
Common Mistakes to Avoid
Any browser-based JSON tool parses numbers as JavaScript doubles, so integers above 9,007,199,254,740,991 are silently rounded with no error shown. Database bigint identifiers and platform snowflake IDs routinely exceed that. If a large numeric ID matters, check it against the raw text rather than the parsed view, and transmit identifiers as strings wherever you control the source.
JSON payloads frequently contain access tokens, customer records, and internal configuration, and every online tool claims to be private. Verify rather than assume: open the network tab and confirm no request carries your data, or disconnect from the internet and check the tool still works. Also note that some tools separate processing from saving, and a save feature may publish data the formatter never transmitted.
JSON borrowed JavaScript's object notation and then restricted it, so comments, trailing commas, single-quoted strings, unquoted keys, NaN, and Infinity are all invalid despite being familiar. Most parse failures come from one of these rather than from anything structurally wrong, and the error location usually points at the character after the real problem.
Quick Reference
|
Item |
Detail |
|
Processing |
Runs entirely in your browser |
|
Verify |
Network tab, or go offline |
|
Format vs tree |
Text for editing, tree for structure |
|
Large integers |
Above 2^53 lose precision silently |
|
IDs |
Send as strings, not numbers |
|
Comments |
Never valid in JSON |
|
Trailing commas |
Not permitted |
|
Quotes |
Double only, never single |
|
NaN and Infinity |
Invalid |
|
Duplicate keys |
Valid but unpredictable |
|
Large files |
Collapse branches |
|
Very large files |
Belong in a CLI tool |
