JSON Validator
Check JSON syntax instantly and get the exact line, column, and message for every error. Live validation in your browser — nothing you paste is stored.
Calculator
—
—
Verdict
—
How JSON Validator Works
What is a JSON Validator?
A JSON validator checks whether text is syntactically legal JSON according to RFC 8259 — the specification that every JSON parser follows. Unlike a formatter, its job is the verdict: valid or invalid, and if invalid, exactly where. This tool reports the line number, column number, and parser message for the first syntax error, so you fix problems instead of hunting for them.
Validation runs live in your browser — nothing you paste is stored. Paste a config file, an API response, or a hand-edited payload and get an instant verdict.
What Makes JSON Invalid?
| Mistake | Example | Why it fails |
|---|---|---|
| Trailing comma | {"a": 1,} | JSON forbids commas before closing brackets |
| Single quotes | {'a': 1} | Strings and keys require double quotes |
| Unquoted key | {a: 1} | Valid JavaScript, invalid JSON |
| Comments | // note | JSON has no comment syntax |
| Special values | undefined, NaN | Not JSON values — use null |
| Control characters | raw tab in string | Must be escaped as \t, \n, etc. |
Valid JSON Is More Than Objects
A common misconception: JSON does not have to be an object. Per RFC 8259, any of these is a
complete, valid JSON document: {"a": 1}, [1, 2, 3], "hello",
42, true, and null. This validator accepts all of them —
if a stricter system (like an API gateway) rejects a bare scalar, that is the system’s policy,
not the JSON grammar.
Validator vs Formatter
Use the validator when you need a diagnosis — a CI config failing to parse, an API rejecting your payload, a hand-edited file misbehaving. Use the JSON Formatter when the JSON is (or should be) valid and you need it readable or minified. The formatter validates as a side effect; the validator diagnoses with line-and-column precision as its whole job.
Privacy and Limits
Validation runs in your browser; pasted text is never stored. With JavaScript disabled the form falls back to transient server-side parsing — also unstored. Input is capped at 1 MB.
Accuracy & Sources
Last reviewed: July 2026. Formula source: ECMA-404 / RFC 8259 — The JSON Data Interchange Format. All calculations run in your browser. No data is sent to any server.
Frequently Asked Questions
Paste it into the input box and click Validate (it also checks live as you type). You get an instant verdict — Valid or Invalid — plus the line number, column number, and parser message for the first syntax error if there is one. Fix that error and re-validate; parsers stop at the first problem, so complex files may take a couple of rounds.
The parser reached a place where a JSON value (string, number, object, array, true, false, or null) was required but found something else — often a trailing comma, a missing value after a colon, or JavaScript-only tokens like undefined. Go to the reported line and column; the mistake is at or immediately before that position.
JSON was deliberately specified as a minimal interchange grammar (RFC 8259) — simpler to parse identically across every language. Trailing commas and comments are conveniences of full programming languages that were left out for uniformity. If you need comments in config files, formats like JSONC, JSON5, YAML, or TOML allow them — but standard JSON parsers will reject those extensions.
Yes. Since RFC 8259, any JSON value is a valid document at the top level: 42, "hello", true, null, arrays, and objects all pass. Older tools sometimes required an object or array root — if a system rejects your bare scalar, it is enforcing its own policy, not the JSON standard.
No — validation runs in your browser via JavaScript, and your text never leaves your machine. Only when JavaScript is disabled does the form fall back to server-side parsing, which is transient: the input is parsed, the verdict returned, nothing stored or logged. Safe for config files, though as a habit avoid pasting live secrets anywhere.
Syntax and schema are different layers. This tool checks syntax — whether the text is legal JSON at all. Your API additionally enforces a schema: required fields, types, value ranges, no unknown keys. Valid syntax with a missing required field still gets a 400. Check the API's error body for schema details, and consider JSON Schema validation in your pipeline for that layer.
No, and deliberately — automatic 'repair' has to guess your intent, and a wrong guess (deleting the wrong comma, quoting the wrong token) silently corrupts data. The tool gives you the exact position and reason instead, which makes the fix a 10-second manual edit. Once valid, the JSON Formatter will pretty-print it for you.