Format, validate, prettify, and parse raw JSON data.
JSON is stricter than the JavaScript it came from. The same mistakes come up again and again: a trailing comma after the last item in an object or array, single quotes instead of double quotes, keys without quotes, comments (JSON doesn't allow any), and values like undefined, NaN or Infinity. Text copied from a log file can also bring invisible characters along, or lose a closing bracket.
When the JSON can't be parsed, the tool shows your browser's own error message, which normally gives the position where parsing stopped, and in some browsers the line and column too. The real mistake is usually just before that point.
Pretty-printing and minifying only change whitespace. Keys and values stay the same, and so does their order, with one exception: keys that look like whole numbers are always put first, in numeric order, because that's how JavaScript objects work.
Two other things to know. Duplicate keys in one object collapse to the last value. And whole numbers larger than about 9 quadrillion (2^53), which some databases use for IDs, can lose precision because JavaScript stores every number as a 64-bit float. If you deal with very large numeric IDs, keep them as strings.
It's purely a style choice. Two spaces is the norm in most JavaScript projects and keeps deeply nested data from drifting off the right edge; four is common in Python and Java codebases. Minified JSON is what you'd send over the network or store, since every unnecessary byte of whitespace is gone.
No. It's parsed with your browser's built-in JSON.parse, so any API keys or customer data in it stay on your machine.
No. It shows where parsing failed so you can fix it. Automatic fixing means guessing what you meant, which can quietly change your data.
No, only standard JSON. Remove comments, trailing commas and single quotes first.
A few megabytes is fine on a normal computer. Very large files, tens of megabytes, can make the page sluggish because everything happens inside the browser tab.
OneClickly is a set of 119 free tools for PDFs, images, text, everyday math and code. They run in your browser, so the files and text you work with stay on your device.