JSON Formatter & Validator
Paste JSON to format, minify or validate it. Everything runs locally in your browser.
How it works
Paste your JSON into the box and press Format (or Ctrl+Enter). The tool parses it with the browser's own strict JSON parser, so if it says the input is valid, any standards-compliant system will accept it too.
When the input is invalid, the error message includes the line and column of the first problem. The usual culprits are trailing commas, single quotes instead of double quotes, unquoted keys and comments, none of which are allowed in JSON.
Minify strips all whitespace, which is handy for config values and URLs. Sort keys orders object keys alphabetically at every level, which makes two JSON documents much easier to compare in a diff.
Questions
Is my JSON sent to a server?
No. Parsing and formatting happen in JavaScript on your device. Nothing is uploaded or stored.
Why does valid-looking JSON fail?
JSON is stricter than JavaScript: keys and strings need double quotes, trailing commas are not allowed, and comments are not part of the format.
How large a file can I format?
Several megabytes work fine in modern browsers; the limit is your device's memory, not the site.