Skip to content
Jellykit

JSON Validator

Check whether JSON is valid and see the exact line and column of the first error, with a plain hint on how to fix it.

  • Runs on your device
  • Works in the background
Loading tool

About JSON Validator

Paste JSON or drop a .json file to find out whether it is valid. If it is not, you get the line and column of the first problem, the offending part of that line highlighted, and a hint written for the mistake it most likely is: a trailing comma, single quotes, a comment, an unclosed bracket and where it was opened, and so on.

Valid documents get a summary of their shape and a list of things that parse but often cause trouble: duplicate keys, integers too large to survive a JavaScript parser, and broken Unicode escapes. Everything is checked in your browser.

How it works

  1. The text is read by a strict parser that follows RFC 8259, the JSON standard, rather than by the browser, whose error messages and positions differ from one browser to the next.
  2. At the first character that cannot be valid JSON it stops and reports the line, the column (counted in characters, a tab counting as one) and what it expected there.
  3. The mistake is matched against common causes, such as comments, single quotes, missing commas or Python-style True and None, to suggest a fix.
  4. For valid JSON it counts values, keys and nesting depth, and lists duplicate keys and numbers that lose precision, each with its path.

Questions

Why does it only show one error?

After the first syntax error the rest of the document cannot be read reliably: one missing quote can make everything after it look wrong. Fix the error shown and the check runs again as you type.

Are comments and trailing commas allowed?

Not in JSON. Some tools read relaxed variants such as JSONC or JSON5, which allow them, but a standard JSON parser rejects both, so this validator reports them as errors.

Why is valid JSON shown with warnings?

Duplicate keys, integers above 2^53 that cannot be stored exactly, numbers beyond the range of a double and lone surrogate escapes are allowed by the grammar but are read differently by different programs. They are listed so you can decide whether they matter.

How large a document can it check?

Up to 10 MB of text, pasted or as a file. Files are read as UTF-8. Checking runs in the background, so the page stays responsive while a large document is parsed.

Is my JSON sent anywhere?

No. The parser runs in this browser tab, and the text is not uploaded or stored.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.