JSON formatter
Format, minify and validate JSON with exact error location.
Paste messy JSON and get back a readable, indented version — or a minified one for production. If there is a syntax error, we show the exact line and column of the problem. Perfect for debugging API responses containing sensitive data, since nothing leaves your browser.
Format, validate and minify JSON
JSON is the most common format for exchanging data between systems and APIs. When it arrives crammed onto a single line, it is unreadable. The formatter re-indents JSON with line breaks and nesting so you can read the structure, validates whether it is correct (pointing to the error) and also minifies — stripping whitespace to make the file as small as possible to transmit.
Common errors it flags
The most frequent JSON slips are a trailing comma before a } or ], missing quotes on keys, single quotes instead of double, and unclosed braces. Instead of hunting the problem by eye, the validator shows the line and the reason, saving debugging time. Keys always need double quotes — the rule that most often trips up people coming from JavaScript.
Your data stays in the browser
All processing is local: paste API responses, configs or sensitive data with nothing uploaded to servers. To inspect encoded data, see the Base64 encoder.
Frequently asked questions
Is it safe to paste production data here?
Yes. Formatting uses the browser’s native JSON.parse with zero network calls. Tokens, keys and personal data in your JSON never leave your machine.
Which errors does validation catch?
Any violation of the JSON spec: trailing commas, single quotes, unquoted keys, comments (which JSON forbids) and unclosed structures — always with the line and column of the first problem.
Does formatting change my data?
No. Formatting and minifying only change whitespace and line breaks; values, key order and types stay exactly the same.