JSON Validator – Exact Errors, Plain-English Fixes and Schema Checks
A good JSON validator does more than say "invalid". This one checks your text against RFC 8259, the JSON standard, with its own parser, so every browser gives the same messages and the same line:column positions. It also reports every problem in one pass, where JSON.parse stops at the first one. Paste a document, drop a file or load a sample, and the editor marks each issue as you type. Each issue comes with a compiler-style snippet, a short explanation and, where the fix is unambiguous, a Fix button.
The "almost JSON" mistakes it recognises
Most broken JSON is nearly right. It was copied from JavaScript, printed by Python or pasted out of a chat app. The validator recognises these patterns and explains them instead of reporting a vague syntax error:
- Trailing commas such as
[1, 2,], and comments written with//,/* */or#. - Single-quoted strings, unquoted keys and curly “smart quotes” from word processors.
- Python literals like
TrueandNone, and JavaScript values JSON doesn't have:NaN,Infinityandundefined. - Number forms such as
.5,+1,0x1Fand1_000, and leading zeros like01234. - Raw tabs or line breaks inside strings, unknown escapes like
\d, and invisible characters such as a non-breaking space or a byte order mark. - Structural slips: a missing comma between items, a missing colon, a bracket that is never closed or one that closes the wrong container.
One-click repair that keeps your formatting
The Repair tab lists every fixable issue. Safe fixes, and fixes that change a value (such as NaN becoming null), are ticked by default. Guesses, such as appending the closing brackets of a truncated document, wait for you to tick them. Fixes edit the text in place, so your indentation and everything else stay as they were. You can also re-indent the result with 2 spaces, 4 spaces or tabs, or minify it. The formatter copies numbers and strings exactly as written and keeps key order and duplicate keys, which a JSON.stringify(JSON.parse(text)) round trip would not.
Valid, but risky: warnings worth reading
Some documents are valid JSON but still cause bugs. A duplicate key keeps the last value in JavaScript, but other parsers may keep the first one or reject the document. Integers above 9,007,199,254,740,991 (Number.MAX_SAFE_INTEGER) lose precision in any parser that uses 64-bit floats. This is a common source of corrupted IDs, so the validator shows the value JavaScript will actually read. It also flags very deep nesting, unpaired Unicode surrogates and Windows paths whose \n or \t quietly turn into control characters.
JSONC, JSON Lines and JSON Schema
JSONC mode accepts the comments and trailing commas allowed in tsconfig.json and VS Code settings, and keeps every other rule strict. JSON Lines mode checks a .jsonl or .ndjson file line by line and counts valid, invalid and blank lines. Turn on schema validation to check the document against a JSON Schema (draft-06, draft-07, 2019-09 or 2020-12). Each schema error points to the exact key or value in your document, such as a missing required property, a wrong type or a property that isn't allowed.
See the structure of valid JSON
When the document is valid, the Structure tab counts values by type and shows the maximum depth, the largest array and the longest string. It also draws a collapsible tree. Click any row to select that value in the editor, or copy its JSON Pointer (/items/0/price) or JSONPath ($.items[0].price).