Paste JSON to check that it is valid and to make it easy to read. This free JSON formatter beautifies with your choice of indentation, minifies it to one line, and tells you where the error is if the JSON is invalid.
How it works
The tool parses your text with the browser’s built-in JSON parser. If it parses, the result is written back out with the indentation you choose, or with no spaces when minified. If not, the parser’s error message is shown, which usually points to the position of the problem.
Common mistakes are trailing commas, single quotes instead of double quotes, unquoted keys and missing brackets.
Example
Pasting a compact one-line JSON object and choosing Format gives a neatly indented version with each key on its own line.
Frequently asked questions
Is my JSON sent to a server?
No. It is processed in your browser and never uploaded.
Why does it say my JSON is invalid?
Check for trailing commas, single quotes, unquoted keys, or comments. Standard JSON does not allow them.
What does minify do?
It removes spaces and line breaks to make the JSON as short as possible.
More free tools: Base64 encoder · URL encoder · All free tools
Everything runs in your browser. Nothing you paste is sent or stored.