Developer
JSON Formatter & Validator
Paste your JSON to tidy it up or find what is broken. If it has an error, you will see the exact line and column, and a hint on how to fix it.
Paste JSON above to format or check it.
Your data stays on your device. The JSON is read and formatted in your browser. Nothing you paste is uploaded, saved or logged, so it is fine for private or work data.
How to format and check JSON
- Paste your JSON into the first box.
- If it is valid, you see a short summary and the formatted result. If not, you see the line and column of the problem and a hint.
- Choose Format for readable output or Minify for the smallest size. Copy it or download it as a file.
Common JSON mistakes
- Trailing comma:
{"a": 1,}is not valid. Remove the last comma. - Single quotes: use double quotes for strings and keys.
- Unquoted keys:
{name: 1}must be{"name": 1}. - Comments: JSON does not allow
//or/* */comments. - Special values:
NaN,Infinityandundefinedare not part of JSON. - Line breaks inside a string: write
\ninstead of pressing Enter.
What this tool keeps exactly
- Large numbers such as 12345678901234567890 are written back exactly as you typed them. Many tools round them because they read numbers as floating point.
- The order of keys is kept, unless you turn on sorting.
- Text and escape sequences inside strings are not changed.
Tested, not guessed
Every number below comes from running this tool, not from a guess.
Example of a real error
This JSON has a trailing comma:
{"name": "Ana", "age": 30,}
The tool says: Unexpected “}”, expected a key (line 1, column 27). Hint: A trailing comma before a closing bracket is not allowed in JSON.
How fast it is
We timed the real code in Chrome 153.0.8010.12. Working on 2.7 MB of JSON, it took about 210 milliseconds (median of 5 runs, on a 2-core cloud server). Your phone may be slower, but nothing here waits for a server.
Frequently asked questions
Is my JSON sent to a server?
No. It is checked and formatted in your browser. Nothing is uploaded, stored or logged.
What is the difference between format and minify?
Format adds line breaks and indentation so people can read it. Minify removes all extra spaces and line breaks to make the file as small as possible. The data is the same.
Why does it say my JSON is invalid when it works in my code?
Some programming languages and tools accept extras such as comments, trailing commas or single quotes. Strict JSON, which most APIs and parsers expect, does not allow them. The hint shows what to change.
Does it work with very large files?
It handles files of a few megabytes comfortably. Very large files depend on your device’s memory, because everything is processed in your browser.