What does JSON validation mean?
JSON validation usually begins with a syntax check: can a standards-compliant parser turn the text into an object, array, string, number, Boolean, or null value? A valid document uses double-quoted strings, legal escape sequences, correctly placed commas and colons, and balanced braces or brackets.
Validation is useful before saving configuration, sending an API request, importing a fixture, or debugging a response that another system rejected.
JSON syntax validation versus JSON Schema
Syntax validation answers whether the text is JSON. It does not prove that a user object contains an email field or that a quantity is positive. Those structural and business rules require JSON Schema or application-specific validation after parsing.
Orbilyra's validator is a syntax checker. It helps locate malformed text but does not claim to validate a document against a schema.
How to validate JSON online
- Open the JSON Validator.
- Paste the complete JSON document into the editor.
- Select Validate JSON.
- If parsing fails, read the error and inspect the nearby character or line.
- Correct one syntax problem at a time, then validate again.
The input stays in your browser. When the document is valid, you can use the JSON Formatter to make nested data easier to read.
Invalid JSON example: a trailing comma
Invalid
{
"name": "Orbilyra",
"active": true,
}Corrected
{
"name": "Orbilyra",
"active": true
}The comma after true says another property should follow, but the object ends instead. Removing that comma produces valid JSON without changing the intended data.
Common JSON syntax errors
- Single quotes: strings and property names require double quotes.
- Unquoted keys:
{name: "Ada"}is a JavaScript object literal, not JSON. - Missing commas or colons: separators must appear in exact positions.
- Trailing commas: the final property or array item cannot be followed by a comma.
- Invalid escapes: a backslash must introduce a recognized escape or Unicode sequence.
- Unsupported values: undefined, NaN, Infinity, functions, and comments are not JSON values.
How to interpret parser errors
A parser often reports the point where it became impossible to continue, not necessarily where the original mistake began. If it reports an unexpected token, inspect the preceding string, comma, colon, brace, or bracket as well as the highlighted character.
For deeply nested input, first validate the smallest relevant object or array. Once the syntax is correct, read How to Format JSON to make the structure easier to review.