Says what is wrong with a JSON document and where, then formats it the way you want it.

How JSON Validation Works
Docs
What is JSON Validation?

JSON has a small, strict grammar. A document is either valid or it is not, and the usual reason it is not is a detail that reads perfectly well to a person: a comma before a closing brace, a key in single quotes, a value that JavaScript allows and JSON does not.

Validating means finding the first place the grammar breaks and saying where. Formatting is the other half of the job, and only makes sense once the document parses.

How to Use
  • Paste the document. It is checked on every keystroke, so there is nothing to press.
  • When it does not parse, the line is quoted back with a caret under the exact column, and nothing else on the page pretends to describe it.
  • The indent buttons set the shape of the output, including Minified. Sort keys, escape unicode and compact arrays can be combined with any of them.
  • Structure below shows the tree, how many values of each type there are, and which key names recur.
What Gets Caught
Trailing comma[1, 2, ], allowed in JavaScript and not in JSON
Wrong quotesA key or string in single quotes, or with no quotes at all
Wrong bracketAn array closed with a brace, or an object with a bracket
Not JSON valuesundefined, NaN, Infinity, and True with a capital
Number shapesA leading zero, a bare decimal point, an empty exponent
String contentsAn invalid escape, a short \u, a raw control character
Important Notes
  • Only the first error is reported. JSON gives a parser no reliable way to carry on afterwards, so a second message would be a guess.
  • Duplicate keys are not an error in JSON. The last one wins, the formatted output contains only that one, and the verdict names the key.
  • Numbers keep the text they are written in: an integer beyond about 9 quadrillion keeps every digit, and 1.0 stays 1.0. Only the whitespace around them changes.
  • The order of object keys is preserved unless sorting is switched on. JSON itself does not define an order.
Privacy & Security: the document is parsed in your browser. Nothing you paste is sent anywhere, and the tool works with the network disconnected.

Output