Format JSON
Paste JSON. A valid value is formatted. An error quotes the browser message.
JSONOn this device
The page parses the text with the browser’s JSON parser, then writes it again with the indent you choose. Minify removes the extra space. Comments and trailing commas are rejected, because they are not JSON.
How to use it
- Paste the text.
- Choose two spaces, four spaces, or minify.
- Copy the result or download it. The status says whether it is an object, an array, or a single value.
Good to know
- The text stays in this tab.
- A number that is too large for JavaScript may lose precision. The page does not invent a big-number type.
- Keys stay in the order the parser kept.
Questions
Does it sort the keys?
No. The order you get is the order the browser parsed.
Can I paste JSONC?
No. Comments and trailing commas fail the check, and the message says why.