JSON
JSON formatter and validator
Format, minify, sort keys, validate with the exact line and column of an error, and browse a tree.
Private Everything on these pages runs in your browser. What you type is never sent to a server and nothing is stored.
How to use it
- Paste JSON into the input, or load the sample.
- Choose Format, Minify or Sort keys, and the indentation you prefer.
- Read the exact line and column if the JSON is invalid, then copy the result.
Example
Input
{"b":2,"a":[1,2]}Result
{
"b": 2,
"a": [
1,
2
]
}Frequently asked questions
Is my JSON uploaded anywhere?
No. Parsing and formatting happen in your browser with JavaScript, so the text never leaves your device.
Why does valid-looking JSON fail?
The usual causes are single quotes, trailing commas, comments and unquoted keys. JSON allows none of them; the error message points to the line and column where parsing stopped.