JSON Validator
Check whether text is valid JSON. Shows the line and column of the first error with a plain-English fix, plus depth, key count and size in bytes.
Paste JSON to find out whether it follows the standard exactly (RFC 8259 and ECMA-404). If it does not, the validator stops at the first problem and shows the line, the column, the offending snippet with a caret under it, and what to change. If it does, you see the top-level type, nesting depth, number of keys and array items, and the size in bytes, plus warnings for duplicate keys and integers JavaScript cannot hold exactly.
How to use this tool
- Paste the JSON — an API response, a config file or a log line.
- Read the verdict: Valid JSON or Invalid JSON.
- If invalid, go to the line and column shown, apply the suggested fix and watch the result update.
- Optionally tick Treat duplicate keys as errors for a stricter check.
Formula
JSON text = whitespace, one value, whitespace
Whitespace means only space, tab, line feed and carriage return. Strings need double quotes, numbers are plain decimals without leading zeros, and the literals true, false and null are lowercase. Comments, trailing commas, NaN and undefined are not part of JSON.
Example
{"a":1,} is invalid: the validator reports line 1, column 7 — the comma — because JSON does not allow a comma before }. Removing it gives {"a":1}, which is valid: an object with 1 key, nesting depth 1 and a size of 7 bytes.
Frequently asked questions
What are the most common JSON errors?
Trailing commas, single quotes, unquoted keys, a missing comma between members, comments, line breaks typed inside a string, and curly quotes pasted from a word processor. Each gets its own message here.
Is JSON with duplicate keys valid?
Grammatically yes, but RFC 8259 says names should be unique and that software behaves unpredictably when they are not; most parsers keep the last value. Tick the option to treat repeats as errors.
Why does the column differ from my editor?
Columns count characters from 1 and a tab counts as one. Editors that draw a tab as several columns, or count an emoji as one character instead of two UTF-16 units, may show another number.
Does this check a JSON Schema?
No — it checks syntax only. To test types, required fields or value ranges, use a JSON Schema validator.
Sources
Last updated: 2026-10-30