JSON Validator
Developer Tools · Added 12 July 2026
Paste a JSON document to find out whether it parses, and if not, exactly where it breaks. Valid documents get a structure report: nesting depth, total keys, array lengths and a count of each value type.
How to use the json validator
- 1Paste the JSON you want to check.
- 2Press Validate — or leave live validation on and it checks as you type.
- 3A failure shows the line, column and the offending character in context.
- 4A pass shows the structure summary underneath.
Examples
Valid document
- Input
- {"users":[{"id":1},{"id":2}]}
- Result
- Valid · depth 3 · 3 keys · 1 array · 2 numbers
Invalid document
- Input
- {"a": 1 "b": 2}
- Result
- Invalid at line 1, column 9 — expected ',' or '}' after a value
About the json validator
Common causes of invalid JSON
In rough order of frequency: trailing commas, single-quoted strings, unquoted keys, unescaped double quotes inside string values, comments left in a config file, and stray control characters such as a raw newline inside a string.
A subtler one is duplicate keys. Most parsers accept them silently and keep the last occurrence, so a document can be technically valid while quietly discarding data. The structure summary here reports duplicates so you can catch it.
Validate at the boundary
The right place to check JSON is where it enters your system — the API handler, the config loader, the message consumer. Validating there produces a precise error at the source rather than a confusing type error three layers deep.
For anything beyond syntax, use a schema validator in code. Manual checking works for a one-off debugging session; it does not scale to a contract between services.
Frequently asked questions
What is the difference between validating and formatting?
Does it check against a JSON Schema?
Why does my file fail on the very first character?
Related tools
JSON Formatter
Developer Tools
Pretty-print, minify and inspect JSON with precise error positions.
Base64 Encoder / Decoder
Developer Tools
Encode text to Base64 and decode it back, with full Unicode and URL-safe support.
Regex Tester
Developer Tools
Test regular expressions live with highlighted matches, capture groups and replace.