Skip to content
R3XTools

JSON Validator

Validate a JSON document as you type and see precisely where it breaks.

Document

Paste JSON to validate it

Validation runs as you type

Lines
0
Size
0 B

Result

Waiting for input.

Validation is live — there is no button to press.

Processed locally in your browser. Parsing happens in this tab. Nothing is uploaded, even for large files.

Reference

What is being checked

This is a syntax check against RFC 8259. It answers one question: can this text be parsed as JSON? A document that passes may still be wrong for your API — missing a required field, using a string where a number is expected — because that is a schema question, not a syntax one.

Why the reported position is often one token late

A parser reports the first character it cannot accept, which is not always where you made the mistake. Leave out a comma after a property and the document is still perfectly legal until the next property name appears; the error surfaces there.

When the caret points at something that looks fine, read the line above it. The excerpt shown here includes two lines of context for exactly that reason.

Unclosed brackets and strings

For an unterminated object, array or string, the position points at the opening character rather than the end of the file. Knowing that a document ran out of input is rarely useful; knowing which bracket was never closed is.

Encoding

JSON text is UTF-8. A byte-order mark at the start of a file is not part of the grammar and will be reported as an unexpected character — strip it before parsing. Escape sequences other than \", \\, \/, \b, \f, \n, \r, \t and \uXXXX are invalid, and unescaped control characters below U+0020 cannot appear inside a string.

Questions

What counts as valid JSON?
Double-quoted strings and keys, no trailing commas, no comments, no single quotes, and no undefined or NaN. Numbers cannot have leading zeros or a leading plus. The top level can be any value, not just an object or array — a bare string is valid JSON.
Does this validate against a JSON Schema?
No. This checks syntax — whether the document parses at all — and reports the exact position of the first failure. Schema validation is a different job: it checks whether a document that already parses has the right shape.
Why does the error point at the wrong line?
It usually does not. An unclosed string or bracket is only detected when the parser reaches something that cannot follow it, which can be many lines later. The reported position is where parsing became impossible; the mistake is often the last opening quote or brace before it.