About JSONLint?

JSONLint is a validator and reformatter for JSON, a lightweight data-interchange format. Copy and paste, directly type, or input a URL in the editor above and let JSONLint tidy and validate your messy JSON code.

Tips & Tricks

You can directly input a URL into the editor and JSONLint will scrape it for JSON and parse it.

You can provide JSON to lint in the URL if you link to JSONLint with the "json" parameter. Here's an example URL to test.

parameter. Here's an example URL to test. JSONLint can also be used as a JSON compressor if you add ?reformat=compress to the URL.

Common Errors

Expecting 'STRING' - You probably have an extra comma at the end of your collection. Something like { "a": "b", }

- You probably have an extra comma at the end of your collection. Something like Expecting 'STRING' , 'NUMBER' , 'NULL' , 'TRUE' , 'FALSE' , '{' , '[' - You probably have an extra comma at the end of your list. Something like: ["a", "b", ]

, , , , , , - You probably have an extra comma at the end of your list. Something like: Enclosing your collection keys in quotes. Proper format for a collection is { "key": "value" }

Make sure you follow JSON's syntax properly. For example, always use double quotes, always quotify your keys, and remove all callback functions.

Different Results

If you use a Windows computer you may end up with different results. This is possibly due to the way Windows handles newlines. Essentially, if you have just newline characters (

) in your JSON and paste it into JSONLint from a Windows computer, it may validate it as valid erroneously since Windows may need a carriage return (\r) as well to detect newlines properly. As a solution, either use direct URL input, or make sure your content's newlines match the architecture your system expects!

Credits

Maintained by CircleCell. Thanks to Douglas Crockford of JSON and JS Lint, and Zach Carter, who built a pure JavaScript implementation. You can download the JSONLint source code on GitHub.