Eazy Toolbox
Skip to tool

JSON Validator

Check whether your JSON is valid. If it is not, you get the exact line and column of the first error rather than a vague parser message.

Your data never leaves your browser. This tool runs entirely on your device.

Validation result
Paste some JSON to validate it.

What the validator checks

It checks syntax: whether the document can be parsed as JSON at all. A valid result means the structure, quoting, commas and brackets are all correct.

It does not check semantics. If you need to verify that a document has particular fields with particular types, that is JSON Schema validation, which is a different thing.

The mistakes that cause almost every error

JSON is a strict subset of JavaScript object syntax, and the same handful of differences account for the overwhelming majority of parse failures:

  • A trailing comma after the last element — legal in JavaScript, invalid in JSON.
  • Single quotes instead of double quotes. JSON requires double quotes for both keys and string values.
  • Unquoted keys. {name: "x"} is valid JavaScript but not valid JSON.
  • Comments. JSON has no comment syntax; // and /* */ are both errors.
  • NaN, Infinity or undefined, none of which JSON can represent.
  • A literal newline inside a string, which must be escaped as \n.
  • A trailing character after the closing brace, often a stray bracket from a bad copy-paste.

Privacy

Validation runs entirely in your browser using its own JSON parser. Nothing is uploaded, so pasting a real API response is safe.

Frequently asked questions

Why does my JSON fail on a trailing comma?

JSON does not permit a comma after the final element of an object or array, even though JavaScript accepts it. Remove the comma before the closing brace or bracket.

Can I use single quotes in JSON?

No. JSON requires double quotes around both keys and string values. Single quotes are one of the most common causes of a parse error.

Are comments allowed in JSON?

No. The JSON specification has no comment syntax. Formats like JSON5 and JSONC add them, but standard parsers will reject any file containing them.

Is a bare string or number valid JSON?

Yes. Since RFC 7159 any JSON value is a valid document, so "hello", 42, true and null all validate on their own. Older parsers required an object or array at the top level.

Does this check my JSON against a schema?

No, this checks syntax only. Verifying that particular fields exist with particular types requires JSON Schema, which is a separate specification.