Not all JSON errors announce themselves loudly.
Some crash your application immediately with a stack trace pointing at the exact line. Those are the easy ones. The dangerous errors are the ones that parse silently — where a misquoted string, a duplicated key, or an unexpected null produces technically valid JSON that quietly corrupts your data, returns wrong API responses, or causes logic bugs that take hours to track down.
This tool catches both kinds. Paste your JSON above and get an immediate verdict — valid or invalid — with the exact line number, character position, and a plain-English description of every error found. No guessing. No reading stack traces. No "unexpected token at position 847" with no context.
Before diving into the tool, there's a distinction worth understanding — one that trips up even experienced developers.
Means the document conforms to the JSON syntax specification (RFC 8259). The structure is parseable: brackets match, strings are quoted, commas are in the right places, values use correct types. A valid JSON parser will accept it.
Means the document is valid AND contains the right data in the right shape. A payload can be valid JSON but break your app if a field is missing or a number is where a string is expected.
Our validator handles the first problem — syntax validation — completely and instantly. For the second problem (semantic validation against a schema), you need JSON Schema validation. We cover that too: once your JSON passes syntax validation here, you can generate a JSON Schema from it using our JSON Schema Generator and use that schema for ongoing structural validation in your application.
Think of the two tools as a two-step quality gate: syntax first, structure second.
Our validator runs your input through a strict RFC 8259 compliance check. Here's exactly what it verifies:
Every opening bracket { or [ must have a closing } or ]. Nesting must be correct.
JSON strings must use double quotes. Single quotes are invalid. Unquoted strings are invalid.
Commas between elements. Trailing commas are invalid. Missing commas are invalid.
All keys must be double-quoted strings. Unquoted keys are caught instantly.
Validates strict types: strings, numbers, booleans, null, arrays, objects.
Checks for valid backslash escapes like \n, \t, and \" inside strings.
A valid document must have exactly one root element — either an object {} or an array [].
These are the errors our validator catches dozens of times every day — pulled from the most common mistakes developers actually make.
The single most common JSON error. Valid in JavaScript, Ruby, and Python — completely invalid in JSON.
// Invalid
{
"name": "Alice",
"role": "admin", ← trailing comma
}
// Valid
{
"name": "Alice",
"role": "admin"
}Fix: Remove the comma after the last key-value pair.
Developers coming from JavaScript often reach for single quotes instinctively. JSON doesn't accept them.
// Invalid
{
'username': 'alice_dev'
}
// Valid
{
"username": "alice_dev"
}Fix: Replace all single quotes with double quotes.
JavaScript objects allow unquoted keys. JSON does not. Every key must be a double-quoted string.
// Invalid
{
id: 101,
name: "Bob"
}
// Valid
{
"id": 101,
"name": "Bob"
}Fix: Wrap every key in double quotes.
JSON does not support comments. Standard parsers reject fields with // or /* */ comments.
// Invalid
{
"port": 8080, // development server port
"debug": true
}
// Valid
{
"port": 8080,
"debug": true
}Fix: Remove all comments.
`undefined`, `NaN`, `Infinity` are valid JavaScript but have no representation in JSON.
// Invalid
{
"value": undefined,
"ratio": NaN
}
// Valid
{
"value": null,
"ratio": null
}Fix: Replace undefined/NaN with null.
A string that starts with a double quote but isn't closed properly. Often caused by unescaped quotes inside string content.
// Invalid
{
"message": "He said "hello" to her"
}
// Valid
{
"message": "He said \"hello\" to her"
}Fix: Escape any double quote characters inside a string value with a backslash: `\"`.
Strict RFC 8259. Rejects trailing commas, single quotes, comments. This is what our tool matches.
Generally strict but allows NaN and Infinity by default (non-standard).
Strict parser. However, many Node config tools allow comments and trailing commas (JSONC).
Uses JSONC (JSON with Comments), which allows comments/trailing commas. Not valid standard JSON.
VS Code and IntelliJ offer built-in JSON validation. Enable schema-based validation for config files.
Validate all JSON files in the repo using Python or `jq`:
Validate all incoming JSON using a schema validation library (`ajv` for Node, `jsonschema` for Python) before processing requests.
Validation checks syntax correctness. Formatting beautifies code. Our JSON Formatter handles formatting.
JS allows single quotes, trailing commas, comments. JSON is strict and does not.
The parser found a character it didn't expect, usually checking for missing commas/quotes.
Yes. Root element can be an object {} or array [].
RFC 8259. Standard for all modern JSON parsers.
No, this checks syntax. Use JSON Schema Generator for structural validation.
No hard limit. Large files handled in-browser.
Likely a schema issue (wrong fields/types), not a syntax issue.
Not directly. Copy output from API tool and paste here.
No. Everything runs locally in browser.
No stack traces. No cryptic parser messages. Just clear, immediate feedback.