A verifiable example
This document has a trailing comma, which JSON does not allow:
{
"service": "api",
"retries": 3,
}
The tool identifies the comma on line 3, column 18, shows that line as context, and suggests removing the comma or adding another property. Once it is removed, the document is valid without the tool changing any other text.
Reading the diagnostic
Select Validate JSON or press Ctrl/⌘ + Enter. When there is a problem, the
result separates the error type, line and column, context with a marker beneath
the detected character, and a suggestion. Go to error places the cursor at
the reported position. The browser’s technical detail remains available when
you need to compare it with another application’s message.
For the complete workflow, see how to validate JSON and find an error.
What it checks
Validation uses the browser’s native JSON syntax. It accepts objects, arrays,
and root values such as a string, number, boolean, or null. It checks
structure, quotes, separators, numbers, and escape sequences.
It does not validate business rules or a JSON Schema. A document can be syntactically correct while still missing properties required by an API.
Common errors
- Trailing commas: a comma cannot appear immediately before
}or]. - Single quotes: properties and strings require double quotes.
- Comments:
//and/* ... */are not JSON. - Separators: every property needs
:, and consecutive pairs need,. - Unclosed strings: every opening double quote needs a closing quote.
- Extra content: a document can contain only one root value.
Compare each pattern with an invalid input and its correction in common JSON writing errors.
Edge cases
- Empty input is not a JSON document.
LF,CRLF, andCRline endings are considered when locating an error.- Unicode characters are valid inside correctly closed strings.
- Large integers are parsed but never reserialised or shown as output, so their original text is not altered.
- Only the first syntax error is shown; validate again after fixing it.
- Very large documents depend on the device’s available memory and processing power.
Frequently asked questions
Does the tool fix JSON automatically?
No. It explains the first problem and leaves the input untouched, preventing an automatic correction from changing data or structure without your knowledge.
Is JSON with comments or single quotes valid?
No. Some JSON-like configuration formats allow them, but the JSON standard does not. The diagnostic distinguishes them so that you can remove or convert them.
Does it check JSON Schema?
No. This page checks syntax. Required properties, types, and schema-defined formats are a separate validation task.
Is pasted content stored?
No. Analysis runs in this tab, with no processing requests, local storage or content added to the URL. Optional page-view measurement never receives the pasted JSON.