Skip to content
All tools›Validators›JSON Validator

JSON Validator

Validates a JSON string against RFC 8259 and the JavaScript language specification. Configure the validator to be strict or lenient.

Loading tool...

JSON Explained

What does this validator check?

The validator parses your text with a strict parser that implements RFC 8259 and ECMA-404. Every character is examined: when the document is not valid the exact line and column of the first problem is reported together with an excerpt of the source.

The JSON rules

  • A document contains exactly one value: an object, an array, a string, a number, true, false or null.
  • Objects are written { "name": value, ... }. Names must be strings in double quotes.
  • Arrays are written [ value, value, ... ].
  • Values are separated by commas. A trailing comma is not allowed.
  • Strings use double quotes only. Characters ", \ and control characters must be escaped.
  • Numbers: optional minus sign, integer part without leading zeroes, optional fraction and exponent.
  • The literals are lower-case: true, false, null.
  • Whitespace is allowed between tokens. Comments are not part of JSON.

Strict versus lenient

By default the validator is strict. Tick the options to accept common extensions: non-quoted names, single-quotes, NaN/Infinity, leading zeroes, comments, trailing commas.

---