JSON Validator
Validate JSON syntax
Configure
About this tool
Validate JSON syntax
Check whether text follows JSON syntax
JSON Validator sends the entered text to the code-tool service and runs JSON.parse. It reports valid JSON or a parser error with a calculated line and column when a character position is available.
Validation answers a narrow question
- •Check copied API data before importing it.
- •Find syntax errors in configuration or fixtures.
- •Distinguish invalid JSON from data that is valid but semantically wrong.
How to use this tool
- 1.Paste JSON without secrets, tokens, or sensitive records.
- 2.Run validation and read the parser message and reported location.
- 3.Correct syntax, validate again, then use a schema-specific tool if the data must follow a contract.
Rules enforced by JSON.parse
- Object keys and strings require double quotes; single quotes are invalid.
- Trailing commas, comments, undefined, NaN, and unquoted keys are not accepted JSON.
- Objects and arrays must be correctly nested and every opening brace or bracket must close in order.
Example: diagnose a trailing comma
The text {"active":true,} is rejected because JSON does not allow the comma before the closing brace. Removing that comma makes the syntax valid, but does not prove that active is an allowed field for a particular API.
Syntax validity is not data validity
- The tool does not validate against JSON Schema or an API contract.
- It does not repair malformed input or verify whether values are truthful.
- Input is processed by the server-side code API, so confidential material should not be submitted.
Fix common parser failures
- Error near a property: quote the key and use double-quoted string values.
- Error near a closing brace or bracket: remove a trailing comma or add a missing value.
- Unexpected end: close every open array, object, and string.
Continue the workflow
Return to Code tools, or continue with a complementary tool:
Questions about this specific tool
Does this validator use JSON Schema?
No. It checks JSON syntax with JSON.parse. Use JSON Schema Validator for contract validation.
Why are single quotes rejected?
JSON strings and object keys require double quotes.
Are trailing commas allowed?
No. Remove the comma immediately before a closing brace or bracket.
Does validation format or repair JSON?
No. It reports syntax validity and parser errors; JSON Formatter is the separate indentation workflow.