ENRU

JSON Validator

Your JSON has the right to remain valid.

Inputempty

Paste JSON. I’ll tell you exactly where it breaks.

Checked as you type · drop a file on this pane

There are two kinds of JSON: valid, and the kind that hasn’t met me yet.
— JSON Statham
Output
Waiting for JSON to validate.
Waiting for JSON.
Ln 1, Col 11:10 BAPI

Paste JSON and it’s checked as you type. Valid: you get the stats. Invalid: you get the code, the line, the column and what to do about it.

How it works

  1. Paste JSON — it’s checked as you type.
  2. Error? Press Show me (F8): the cursor lands on the exact character.
  3. Fix it; the next check runs on its own.

What I check

Strict JSON as RFC 8259 defines it. Each problem has its own code:

trailing_comma
Trailing comma[1, 2,]
single_quotes
Single quotes{'a': 1}
smart_quotes
Curly quotes{“a”: 1}
unquoted_key
Unquoted key{a: 1}
missing_comma
Missing comma[1 2]
missing_colon
Missing colon{"a" 1}
comment
Comment// note
invalid_literal
Invalid literalTrueNoneNaN
invalid_number
Invalid number01.50x1F
unclosed_object
Unclosed object{"a": 1
extra_data
Extra data after JSON{} {}
invalid_escape
Invalid escape"C:\Users"
bom
Byte order mark
control_character
Control character in string

FAQ

Why only one error at a time?

The first error often causes the next ones. I report the first one precisely; fix it and the check runs again as you type.

What exactly is checked?

Strict JSON as defined by RFC 8259. Not allowed: trailing commas, single or curly quotes, comments, unquoted keys, NaN, Infinity, undefined, leading zeros, hex numbers, a byte order mark.

How are lines and columns counted?

Both start at 1. A column is a Unicode code point, not a byte: a tab or a simple emoji is one column; an emoji built from several code points, such as a flag or one with a skin tone, counts each of them.

Are duplicate keys an error?

No. RFC 8259 allows them, so the document is valid and formatting keeps both. Many parsers keep only the last one, so it’s worth avoiding them.

Other tools

Keyboard shortcuts

Everywhere
Ctrl+EnterRun the page’s main action
Ctrl+OOpen a file
F8 / eJump to the error
/Focus the input
cCopy the output
qAnother quote
?This help
EscClose
Tree
tCode / Tree

Keys like c, t, q work when the cursor isn’t in an editor.

Runs the tool after a pause in typing: 0.6 s, or 1.2 s above 64 KiB; off above 256 KiB. Each run sends your JSON to our API.