input.json · editing
output.json · 2-space
Paste JSON and click Validate to check syntax.

Strict JSON syntax validation

Copy and paste a document and click Validate. The tool enforces strict rules of JSON syntax, reports the first error with a line and column number, centers the editor near that location, and formats the document when parsing succeeds. browser validation runs.

If the text is valid syntactically JSON then the result is successful. It does not mean that the fields match your API, the values are reliable, or the document complies with a JSON Schema.

How to investigate a failure

  1. Read the reported line and column, but inspect the previous line too. A missing quote or bracket often makes the next token appear to be the problem.
  2. Identify whether the source is meant to be JSON. JavaScript object literals, JSONC, Python dictionaries, and YAML use different rules.
  3. Correct the source when you control it. If you only have the broken text, use JSON Fix and review its proposed repair.
  4. Validate again, then check the parsed structure against the receiving application's contract.

Common syntax failures

  • Single quotes — JSON requires double quotes around strings and keys
  • Trailing commas — the last item in an object or array must not be followed by a comma
  • Unquoted keys — every object key must be a double-quoted string
  • Comments// line and /* block */ comments are not valid JSON
  • Python literalsTrue, False, None must be true, false, null
  • Extra text — a JSON document contains one top-level value, not two adjacent values or an explanatory sentence
  • Invalid escapes — a backslash in a string must begin a supported JSON escape, which is why unescaped Windows paths often fail

Syntax validation versus schema validation

Syntax validation answers whether the document can be parsed. Schema validation can answer whether email is required, age is a number, status belongs to an allowed set, or additional properties are forbidden. Most production boundaries need both checks.

Be particularly careful with numbers. When parsed by JavaScript , a syntactically valid large integer could be out of the range of safe integers . JSON strings are often safer with identifiers that require exact digits.

FAQ

What's the difference between validating and parsing JSON?

Parsing returns a value that your program can use. Syntax validation only needs to know that parsing succeeds, so it can discard that value. As an additional review aid, this tool provides a formatted version.

What does "Unexpected token" mean in JSON validation?

The parser found a character or word that it wasn’t expecting. The token is invalid or a missing delimiter earlier may have shifted the parser out of place.

Is client-side JSON validation secure?

Client-side validation does not send the pasted document to a validation API, which is a useful privacy property. It doesn’t make sensitive data safe: sanitize secrets, consider browser extensions and device security, follow your organization’s data-handling policy.