JSON Formatter
Format, minify and validate JSON, with errors pointed out.
JSON
No JSON yet
Paste JSON, open a .json file, or . It stays on this device.
$
How this works
Paste JSON, type it, or open a .json file; it is checked as you go. Format lays it out with 2 spaces, 4 spaces or tabs; Minify takes out every space between values; Validate only checks it. Sort keys puts the keys of every object, at every level, in alphabetical (Unicode) order.
This page reads the JSON with a parser of its own rather than the browser's, so the result keeps everything exactly as you wrote it: big numbers like 12345678901234567890 and 0.10 are never rounded or rewritten, and escapes like é stay escapes. When something is wrong it says where (line and column), points at the spot, and says what to change.
Tree shows objects and arrays you can open and close; hover over or focus an item to see its path, like $.users[2].name. Arrow keys move through the tree. Files up to 10 MB are read on this device, never uploaded, and inputs over a few hundred KB are worked through in steps, so the page stays responsive.
Nothing you paste or open is saved unless you turn on Remember last input (up to 500 KB); turning it off deletes the saved copy. The options you pick are saved on this device.
Saved on this device only. Nothing is sent anywhere.