JSON Formatter and Validator
Pretty-print or minify JSON, and get the line and column when it will not parse.
About this tool
Formats JSON with indentation, minifies it, or just tells you whether it parses.
When it does not parse you get the line, the column, and the line itself. "Syntax error" on its own is useless on a 400-line document — the offset is the whole point, and most formatters throw it away.
Common questions
Why does my JSON not parse?
Nearly always one of three things: a trailing comma after the last item, single quotes instead of double, or an unescaped newline inside a string. JSON allows none of them, unlike JavaScript object syntax.
Are comments allowed in JSON?
No. Not // and not /* */. Several tools accept them as an extension, which is why they keep appearing, but a strict parser rejects the file outright.
Does formatting change the data?
No. Whitespace between tokens is not meaningful, so pretty-printing and minifying are both lossless. Key order is preserved as written.
Should I minify JSON in production?
For API responses it saves little once compression is on — gzip removes repeated whitespace almost entirely. Readability during debugging is usually worth more than the remaining bytes.