How to use
- Paste JSON into the JSON input box.
- If there is an error, its line, column and reason appear. [Go to error] selects that spot in the input box.
- Valid JSON appears as a tree. Click an object or array row, or press Enter or Space on it, to open or close it.
- Choose the result format (formatted or minified) and press [Copy result] to copy the formatted result.
Example
Entering {"name": "Rabbit", "tags": ["a", "b",]} gives an error at "Line 1, column 38" because of the trailing comma in the array. Remove the comma and the tree shows name (string) and tags (array, 2 items); the formatted result uses a 2-space indent and the minified result is a single line without spaces.
Supported formats, limits and privacy
- Input: up to 5MB (in UTF-8). Beyond that it is not checked and a message explains why.
- The tree opens up to 100 levels deep and draws only the first 5,000 values. With more values than that, only the top level is opened and the rest is marked as omitted. The formatted result always has everything.
- Long strings in the tree show only the first 500 characters together with the full length. The formatted result contains the whole string.
- Only standard JSON is accepted. Comments, trailing commas, single quotes, NaN and Infinity are errors. If a key appears more than once, only the last value is kept.
- Formatting and minifying rewrite the values, so number notation can change (1.0 → 1, 1e3 → 1000). Numbers beyond double precision (such as very large IDs) become approximations, and a separate warning is shown.
- The JSON you enter is only read with JSON.parse and never run as code. It is processed only inside this browser and is not sent to a server or stored.
Frequently asked questions
How is the column of an error counted?
Lines start at 1 and the first character of a line is column 1. Each emoji or other character counts as one. [Go to error] selects that character in the input box.
A large numeric ID changed after formatting.
JavaScript numbers are double precision, so numbers with more than about 15 to 17 digits cannot be held exactly. A warning appears when such numbers are found; if you need the exact values, use your original text.
Is the JSON I enter saved anywhere?
No. Checking, the tree and formatting all happen inside this browser and nothing is sent or stored. It disappears when you close the page.