Skip to content
Toolora

JSON Validator

Paste JSON to confirm it parses, or get the line and column of the syntax error — plus a structural summary of keys, depth and size.

Developer Runs in your browser Works offline
Loading tool…

How it works

Validation is a real parse with the browser's own JSON parser, not a pattern match. If it parses here it will parse in your application, because it is the same implementation.

The raw parser error only reports a character offset, which is useless in a large file. That offset is converted into a line and column so you can jump straight to the problem.

The formula

Validity

JSON.parse(input) succeeds without throwing

Error position

offset → line = newlines before it + 1, column = offset − last newline

Worked examples

ScenarioWorkingResult
{"a": 1,}Trailing commaError at line 1, column 9
{'a': 1}Single quotesInvalid — JSON requires double quotes
{"a": {"b": [1, 2]}}Valid3 keys, 2 levels deep

When you'd use it

  • Finding why a config file will not load
  • Checking a payload before sending it to an API
  • Confirming an exported file is well-formed
  • Measuring how deeply nested a response is

Common questions

Why is my JSON invalid when it looks fine?

The three usual causes are a trailing comma before a closing brace or bracket, single quotes instead of double quotes, and unquoted keys. All three are legal JavaScript but not legal JSON.

Does it check against a JSON Schema?

No. This checks syntax — whether the text is well-formed JSON. Validating that the structure matches an expected shape is a separate job and needs a schema validator.

Are comments allowed?

Not in standard JSON. Formats like JSONC and JSON5 permit them, but the strict parser used here rejects them, which is also what most APIs will do.