JSON structure comparison
Compare JSON values and types independently of object key order, with precise paths for added, removed and changed data.
Format · Minify · Check syntax
Read API responses without losing numeric precision to formatting. Only whitespace between tokens changes, and duplicate keys remain visible with a warning.
Paste JSON or open or drop a UTF-8 file to update the result. Formatting makes API responses and nested configuration easier to review. Minifying removes unnecessary whitespace for request bodies or compact files; it does not create a ZIP archive.
This example uses two-space indentation. Every digit in id and the trailing zeros in amount stay unchanged.
{"id":9007199254740993,"amount":1.2300,"active":true}
{
"id": 9007199254740993,
"amount": 1.2300,
"active": true
}
JavaScript Number cannot represent every integer above 9007199254740991 exactly. Tools that parse JSON into an object and then serialize it may turn 9007199254740993 into 9007199254740992. This formatter changes only whitespace between tokens, without converting numbers to Number. It also retains -0, 1e400, key order and string escapes. A downstream application still needs a parser that preserves the precision it requires.
Keys and strings need double quotes, so {'name':'Ada'} is invalid. A trailing comma, as in {"a":1,}, is also invalid. Standard JSON does not allow // or /* … */ comments. The error message identifies the line and column; editing the input runs validation again. The tool does not guess how to repair ambiguous data.
Both keys in {"a":1,"a":2} are retained with a warning. Other applications may keep only one value, so resolve duplicates before sharing the data. Copy and Download use the current result; review it after changing indentation or switching between formatted and compact output.
Input text and files are limited to 5 MiB of UTF-8 data, output to 20 MiB and nesting to 128 levels. Files must contain valid UTF-8. Processing takes place in the current browser. The tool neither uploads input nor writes it to local storage; copy or download anything you need before closing the page.
The formatter never converts numbers through JavaScript Number before output. It only changes whitespace, retaining digits and trailing zeros. Downstream software still needs an appropriate parser to preserve precision.
Check that location and the preceding separator: JSON needs double-quoted keys and strings, with no comments or trailing commas. Fix the source; formatting and minifying do not automatically repair invalid JSON.
Both occurrences stay in the output, including keys that become equal after escape decoding. Decide which value belongs in the source; many downstream parsers silently retain only the last occurrence.
No. UTF-8 files are read locally, with a 5 MiB input limit. Choose indentation or minify, then copy or download the result. Invalid UTF-8, excessive nesting or oversized output must be corrected first.
Comments
0