JSON Validator

Check any JSON for syntax errors with the exact failure position, plus a structure summary: objects, arrays, keys, leaf values and nesting depth.

Developer Tools Runs in your browser · no upload

Reviewed 17 November 2026 · Free · No account needed

ExecutionYour browserInput never leaves your tab
File retentionNoneNothing is stored
AccountNot requiredNo sign-up, no paywall
PriceFreeNo trial, no usage cap on the tool itself

How to use

  1. Paste the JSON to validate.
  2. Read the verdict and, for errors, the exact line/column position.
  3. Valid JSON is re-formatted with 2-space indent for inspection.

Example

Input: {"a": 1, "b": [2, 3}

Output: Invalid — unterminated array, reported near the exact line/column

How it works

The input is parsed as JSON. Valid input is confirmed; invalid input reports the parser's error and the position where parsing failed.

The input is parsed with JSON.parse. Valid documents are re-printed with 2-space indent and summarised — objects, arrays, keys, leaf values and maximum nesting depth are counted in one walk of the tree. Invalid input reports the parser's error with the failing position converted to a line and column.

Worked example

{"a": 1, "b": [2, 3} is invalid — the unterminated array is reported near its exact line and column. A valid document instead shows, for example, 1 object · 1 array · 2 keys · max depth 2.

Edge cases to know

  • Validation follows JSON.parse exactly (RFC 8259): trailing commas, comments and single quotes are errors.
  • Duplicate keys keep the last value, matching browser behaviour.
  • Multi-megabyte documents may be slow on low-memory devices.

Limits & compatibility

  • Validation follows JSON.parse exactly (RFC 8259) — trailing commas are errors.
  • Duplicate keys keep the last value, matching browser behaviour.
  • Very large documents (multi-MB) may be slow on low-memory devices.

Privacy

Your JSON never leaves the browser. There is no server call, no storage and no logging of content.

Further reading

Guides that use JSON Validator

All guides →

Related tools

FAQ

Questions about JSON Validator

What rules does the validation follow?

Exactly what JSON.parse accepts, which is the RFC 8259 grammar: no comments, no trailing commas, no single-quoted strings. When parsing fails, the error is reported with the line and column position of the failure, so a stray comma in a long document takes seconds to find rather than minutes.

What does the structure summary tell me?

For valid input it counts objects, arrays, keys and each kind of leaf value — strings, numbers, booleans and nulls — plus the maximum nesting depth. It is a quick shape check before you wire a payload into code: an unexpectedly deep document or a key count that looks wrong usually means the wrong export was pasted.

Why is my JSON rejected when another tool accepts it?

Most often trailing commas — many editors and linters tolerate them, but JSON.parse treats them as syntax errors, and so does this validator. Duplicate keys are the opposite case: they parse fine, and the last value wins, matching browser behaviour. Everything runs in your browser, so nothing about the document is uploaded while you debug it.

Is there a size limit?

No hard cap — but validation, the structure summary and the re-formatted 2-space output all run in your browser tab, so multi-megabyte documents may be slow on low-memory devices. If a huge payload stalls, validate a smaller slice first; the syntax rules are the same in every chunk.