JSON formatter and validator
Paste JSON to check it and tidy it up. If something is wrong, you get the line, the column and a plain explanation of what to fix.
FreeNo sign-upRuns on your device
How to use it
- Paste your JSON into the box.
- If it's invalid, read the message and the marked line, fix it, and the check runs again.
- Choose 2 spaces, 4 spaces, tabs or minify, and tick Sort keys if you want them in order.
- Copy the result, download it as a .json file, or press Format in place.
How the checker finds errors
Browsers describe JSON errors in different ways, and some give no position at all. This tool runs its own strict check that follows the JSON standard (RFC 8259) and stops at the first problem. It tells you the line and column and explains the problem in plain words, such as a missing comma, a trailing comma before a closing bracket, single quotes instead of double quotes, or a string that isn't closed.
The line with the problem is shown with a mark under the exact spot. Fix it and the check runs again as you type.
Format, minify and sort
Formatting adds line breaks and indentation so the structure is easy to read. Minify removes every space that isn't needed, which makes the file smaller for sending over a network. Sort keys puts the keys of every object in A to Z order, at every level. That makes two versions of the same data much easier to compare, for example with the text diff checker.
Numbers are kept as JavaScript reads them. Very large whole numbers, above about 9 quadrillion, lose precision in any browser tool, so check IDs of that size by hand.
Common JSON mistakes
Keys and text values must use double quotes. A comma after the last item in a list or object is not allowed. Comments are not allowed. Only true, false and null can appear without quotes. If you copied JSON from JavaScript code, these are the usual problems.
Privacy
Your JSON never leaves your browser, so it's safe to paste API responses and config files. Still, avoid pasting live passwords or keys into any website you don't control.




