JSON Formatter
Format, minify, or validate JSON with clear syntax-error messages
Formats, minifies, or validates JSON — pick a mode and the result updates as you type, with a copy button for the formatted or minified output.
How it works
All three modes parse your input with the browser's built-in JSON parser and either re-serialize it with indentation (format), without any whitespace (minify), or just report whether it parsed at all (validate). Parse errors are shown with the line and column where they occur when the browser's error message provides that detail.
Frequently asked questions
How does it find the exact error location?
When the browser's JSON parser reports a character position for the error (Chrome does this), the tool converts that into a line and column number by counting through your input up to that point — some browsers don't include a position, in which case you get the raw error message without coordinates.
What's the difference between Validate and Format?
Validate just tells you whether the JSON is syntactically correct, with no output box. Format does the same check but also shows a re-indented, readable version of valid JSON.
Does formatting change the data, like key order or number precision?
No — it only changes whitespace and indentation. Key order and values are preserved exactly as parsed, since formatting is just JSON.stringify with an indent argument.
Can it fix invalid JSON for me?
No — it can only tell you that JSON is invalid and roughly where the problem is; it doesn't guess at what you meant or auto-repair syntax errors like a missing comma.
Is my JSON sent anywhere?
No — parsing, formatting, and validation all happen locally in your browser using the built-in JSON parser. Nothing is uploaded.