← Back to all browser tools
DEVELOPER TOOL / 94

Validate the payload.
Find the break quickly.

Paste JSON to check whether it parses, see the error line and column, and copy a formatted version. The payload stays in this tab.

How do I check if JSON is valid? Paste the JSON and the tool points to the exact location of any syntax error.

JSON validator

The three error messages decoded, with the line and column each one reported, in our guide to fixing a JSON parse error.

Result

A valid parse only confirms that the text is syntactically valid JSON. It does not confirm that an API's schema, required fields, or business rules are correct.

How to validate JSON

  1. Paste your JSON — validation runs as you type.
  2. Read the error position — line and column point straight at the problem.
  3. Fix and re-check — copy the formatted result, or open the formatter for a compact version.

Formatting keeps your values intact

Only whitespace outside strings changes. Large integers such as 9007199254740993, decimal and exponent notation, string escapes, property order and duplicate keys are kept as written. Duplicate keys can be interpreted differently by receiving software; preserving them does not make them safe for every API.

Common JSON errors and their fixes

Almost every "invalid JSON" comes down to one of a handful of mistakes. The error position tells you where the problem is; this table tells you what to look for:

What you wroteWhy it breaksThe fix
{"a": 1,}Trailing comma — legal in JavaScript, fatal in JSONDelete the last comma before } or ]
{'a': 1}Single quotesJSON strings need double quotes: {"a": 1}
{a: 1}Unquoted keyQuote every key: {"a": 1}
{"a": 1} // noteComments do not exist in the JSON specRemove comments — or use JSON5/JSONC tooling for config files
{"a": “1”}Smart quotes from Word, Docs, or notes appsRetype the quotes: "1" — straight quotes only
{"a": NaN}NaN, Infinity, undefined are JavaScript values, not JSONUse null — JSON has no NaN
{"a": 1Missing closing braceCount your brackets — the error often appears at the end of the file

One more source that surprises people: a BOM (byte-order mark) at the start of a file saved by some Windows tools. This checker reports the BOM at line 1, column 1. Remove it explicitly or re-save the file as UTF-8 without BOM; leading blank lines are kept for accurate error locations.

Good to know

Syntax validation and schema validation are different jobs: valid JSON can still have the wrong shape. Check structure separately with the JSON Schema validator. Common scenario: webhook payloads and API responses, where a missing comma cascades into a cryptic production error — validate before shipping.

Advertisement
QUICK ANSWERS
Does this send JSON to a server?

No. Syntax checking and formatting run in this browser tab. The JSON is not uploaded.

What does a JSON parse error mean?

It usually points to a missing comma, quote, bracket, or another character that prevents the text from following JSON syntax.

Why does my JSON fail with a trailing comma error?

Trailing commas are legal in JavaScript but not in JSON. Delete the comma before a closing brace or bracket: {"a": 1,} becomes {"a": 1}.

Why does JSON copied from Word or Google Docs fail to validate?

Word and Google Docs replace straight quotes with curly smart quotes, and JSON only accepts straight double quotes. Retype the quotes, or paste through a plain-text editor first.

What does Unexpected token mean in a JSON error?

It usually means single quotes, an unquoted key, or a comment — the three things JavaScript allows that JSON does not. The error position points at the first offending character.