JSON Formatter & Validator
Paste JSON to pretty-print it, check whether it is valid, minify it, or sort every key alphabetically. Errors are reported with the exact line and column.
Parsing uses your browser JSON engine, so what validates here is exactly what your code will accept. Nothing is sent to a server.
Frequently Asked Questions
Is my JSON sent to a server?
No. Parsing uses the JSON engine built into your browser, so the data never leaves your machine. That makes it safe for API responses containing production data.
Why does my JSON fail to validate?
The usual culprits are trailing commas, single quotes instead of double quotes, unquoted keys, and comments — all valid in JavaScript but not in JSON. The error message gives the line and column where parsing stopped.
What does sorting keys do?
It reorders every object key alphabetically at every level of nesting. This makes two versions of the same configuration diff cleanly, which is invaluable when comparing environments.
How much does minifying save?
Typically 15 to 30% for indented JSON, since whitespace is all that is removed. If you are sending JSON over the wire, gzip compression matters far more than minification.