JSON Validator
Check if JSON is valid and pinpoint exact error locations.
What is JSON Validator?
The JSON Validator catches malformed JSON before it bites you downstream. Generic engine errors are not very helpful, so we run a hand-rolled tokenizer that pinpoints the exact line, column and reason for every problem it finds.
How it works
We tokenize the input character-by-character, expecting the RFC 8259 grammar (object, array, string, number, true/false/null). When something is off — a trailing comma, a single-quoted string, an unquoted key — we record the exact position and continue scanning so multiple errors are listed in one pass.
- Paste or drop JSON. Drop a file or paste text. Validation runs on every keystroke (debounced).
- Read the error list. Each error is shown with its line, column and a plain-English reason. The error count and a Valid / Invalid badge are announced via a live region for screen readers.
- Fix and re-validate. Edit in place — the errors update as you type.
Examples
Trailing comma
{ "a": 1, } is reported at line 1, column 9: "Trailing comma not allowed in strict JSON."
Single-quoted string
{ 'a': 1 } is reported at line 1, column 3: "JSON strings must use double quotes."
Common mistakes
Mixing JSON with JSONC / JSON5
Strict JSON forbids comments and trailing commas. If your source is JSONC (for example VS Code settings.json), use a converter first.
BOM in the file
Some editors prepend a UTF-8 BOM (\uFEFF). The Validator will surface it as an unexpected character at position 0.
Alternatives
JSON Formatter
If your JSON is valid and you want it pretty-printed, jump straight to the Formatter.
JSON Schema Validator
For checking JSON against a schema (not just RFC validity), use the Schema Validator (coming soon).
Frequently asked questions
Is my JSON uploaded?
No. Validation runs entirely client-side.
Why not just use JSON.parse?
JSON.parse throws a generic 'Unexpected token' error with no line or column. Our tokenizer gives you both, plus reasons in plain English.
Does it support JSON5 / JSONC?
Not in Wave 1 — strict RFC 8259 only. A future mode toggle would relax these checks.