Skip to content
ToolBoxGenie

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

  1. 1Paste the JSON you want to check.
  2. 2Press Validate — or leave live validation on and it checks as you type.
  3. 3A failure shows the line, column and the offending character in context.
  4. 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?
Validation answers whether the document parses at all and describes its shape. Formatting rewrites it for readability. This page reports structure, which is useful when you need to confirm an API returned the fields you expected.
Does it check against a JSON Schema?
Not yet. This validates syntax, not conformance to a schema. Syntactic validity means the document parses; it says nothing about whether a required field is present or a value is in range.
Why does my file fail on the very first character?
Usually a byte-order mark left by a Windows editor, or an invisible zero-width space pasted from a web page. Both sit before the opening brace and stop the parser immediately. Run the text through the Text Cleaner first.