Image, File and Developer Tools
JSON Formatter
Format JSON so it is easy to read, or minify it to a single line. Invalid JSON shows the exact error message.
Calculation History
Your recent calculations on this device. Stored only in your browser, never uploaded.
No calculations yet on this device.
How to Use
Paste your JSON into the box and press Format. The formatted version and the minified version appear below. If the JSON is invalid, the error message tells you what is wrong.
Formula and Methodology
The text is parsed with the browser built-in JSON parser. On success, the pretty version is printed with 2-space indentation and the minified version is printed with no extra whitespace. On failure, the parser error message is shown.
Tips
JSON needs double quotes around property names and string values. Single quotes are not valid JSON and will cause a parse error.
Trailing commas after the last item in an object or array are not valid JSON. Remove them before formatting.
Frequently Asked Questions
It shows two versions: a pretty-printed version with 2-space indentation that is easy to read, and a minified version on one line that is smaller to store or send.
The parser error message is shown, for example that a comma or a closing bracket is missing. Fix the spot the message points to and try again.
No. Formatting happens entirely in your browser. Your data is never uploaded, stored or sent anywhere.