Validation result will appear here
Paste your JSON on the left and click Validate, or enable live validation in the toolbar.
Validation that tells you exactly what's wrong
🎯 Pinpoint errors
When JSON is invalid, you get the exact line, column, and character position. A visual pointer shows where the parser failed — no more guessing where the missing comma went.
⚡ Live validation
As you type, validation runs automatically (debounced for performance). See the green checkmark the moment your JSON becomes valid, or instant feedback on errors.
📋 Schema support
Beyond syntax, validate against a JSON Schema (draft-07). Check types, required fields, minimum/maximum values, patterns, and more. Switch to "Schema validation" mode in the toolbar.
📊 Structure summary
For valid JSON, get a quick summary: total nodes, depth, type counts (objects, arrays, strings, numbers, booleans, nulls). Useful for sanity-checking API responses.
🔧 Repair hints
Common errors include suggested fixes. Missing comma? Unquoted key? Single quotes instead of double? The validator explains what's wrong and links to the JSON Repair tool.
💾 Local persistence
Your input is automatically saved to localStorage. Close the tab, come back tomorrow, and your work is still there. No accounts, no sync, no surveillance.
Why JSON fails to parse
Missing comma
{
"a": 1
"b": 2 ← missing comma
}
Trailing comma
{
"a": 1,
"b": 2, ← trailing comma
}
Single quotes
{
'a': 'value' ← use double quotes
}
Unquoted keys
{
a: 1 ← key must be quoted
}
Comments
{
// comment ← not allowed
"a": 1
}
NaN or Infinity
{
"a": NaN, ← use null instead
"b": Infinity
}
Validating JSON — common questions
How do I validate JSON online?
Paste your JSON into the input box on this page. Validation runs automatically as you type (with a small debounce for performance). You'll see either a green "Valid JSON" indicator with a summary of the structure, or a red error panel showing the exact line, column, and character where parsing failed.
You can also click the Validate button to force validation, or use the Ctrl+Enter keyboard shortcut. For large files, validation happens in a Web Worker to keep the UI responsive.
What makes JSON invalid?
The most common causes of invalid JSON are:
• Missing commas between key-value pairs or array items
• Trailing commas after the last item (not allowed in JSON)
• Single quotes instead of double quotes for strings
• Unquoted keys (JSON requires keys to be in double quotes)
• Comments (// or /* */ — JSON does not support comments)
• NaN or Infinity (not valid JSON numbers — use null)
• Hexadecimal numbers (0xFF — not allowed in JSON)
• Unterminated strings (missing closing quote)
JSONLab identifies the exact location of each error. For automatic fixing, use the JSON Repair tool which handles most of these issues.
What is the difference between syntax and schema validation?
Syntax validation checks that your JSON is well-formed according to RFC 8259: correct quotes, commas, brackets, and value types. It catches structural errors but cannot tell you if the data is semantically correct.
Schema validation checks your JSON against a JSON Schema document that defines the expected structure: required fields, value types, allowed ranges, patterns, and more. For example, a schema can require that age is a non-negative integer, even though any integer is syntactically valid JSON.
Switch to "Schema validation" mode in the toolbar and paste a schema to use this feature.
Which JSON Schema draft is supported?
JSONLab implements a subset of JSON Schema draft-07. Supported keywords: type, required, properties, items, enum, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, minLength, maxLength, pattern, minItems, maxItems, uniqueItems, minProperties, maxProperties, and additionalProperties.
Not supported: $ref (cross-file references), if/then/else, oneOf with complex logic, and format keyword validation. For full schema validation, use a server-side library like Ajv.
Does this work for very large JSON files?
Yes. JSONLab uses the browser's native JSON.parse which handles multi-megabyte files in milliseconds. For extremely large files (10MB+), validation is offloaded to a Web Worker so the UI remains responsive. There's no artificial size limit — your browser's memory is the only constraint.
Is my JSON sent to a server?
No. JSONLab is 100% client-side. Validation happens entirely in your browser using native JavaScript APIs. There's no server to receive your data — you can verify this in your browser's DevTools Network tab.