Free tool
JSON Lint
Paste JSON and see if it is well formed. If it is, you get a tidy copy. If it is not, you see where it breaks. What you pasted stays put, and it stays in the browser.
The document does not leave your browser. We do not send it and we do not store it.
What JSON is
JSON is text for moving data from one place to another. You will see it in APIs, config files and server responses.
An object sits between { } and groups named fields. A list sits between [ ] and keeps values in order.
Keys and text use double quotes. Numbers do not. true, false and null are allowed too.
What this page does
- It checks whether the text you pasted is JSON.
- When it is, you get the same content with line breaks and a 2-space indent.
- When it is not, you get the problem and, if the browser can say, the line and column. The text above is left as you pasted it.
Mistakes that show up most
- A trailing comma. No comma after the last field. {"a": 1,} is not JSON.
- Single quotes. Strings use double quotes. 'hello' is not valid; "hello" is.
- Keys without quotes. The field name needs double quotes too: "name": "Ana".
- Comments. // and /* */ are not part of JSON. Take them out.
- Two documents in a row. {"a":1}{"b":2} is two objects stuck together. You need one value: an object or a list.
- JavaScript values. undefined, NaN and Infinity are not JSON. Use null or a number.