JSONLint

Validate, format, and beautify JSON with real-time error detection.

About the JSON Lint

Paste JSON to check whether it is valid. Valid JSON is formatted and ready to copy or download; invalid JSON shows the parser’s error message so you can find the problem.

Everything you enter is processed in your browser; nothing is uploaded or stored.

How to use it

  1. Paste your JSON into the box.
  2. Press Validate & Format.
  3. If it is valid, copy or download the formatted result; if not, fix the reported error and validate again.

What a JSON linter checks

The linter runs your text through a strict JSON parser. JSON is stricter than JavaScript: keys and strings must use double quotes, trailing commas are not allowed, and comments, NaN, undefined and functions are not valid.

When parsing fails, the error message names the unexpected character and its position, which points you to the faulty line.

Example

{"name": "Ravi", "age": 21,} fails because of the trailing comma after 21. Remove it and the JSON validates.

Tips

  • Copying from documents can turn straight quotes into curly “smart” quotes, which are invalid in JSON.
  • Large numbers above 2^53 lose precision when parsed in JavaScript; keep IDs as strings.

Frequently asked questions

What is JSONLint?

A JSON linter is a validator that checks JSON syntax and points out errors. This page is a free JSONLint alternative that runs in your browser.

Why is my JSON invalid?

The usual causes are single quotes, a trailing comma, a missing comma between items, unquoted keys or comments.

Does it check against a schema?

No, it checks syntax only. To validate against a JSON Schema, use the JSON Validator.