JSON Validator
Check JSON syntax locally and see its root type, value count, and nesting depth.
Loading tool…
How to use JSON Validator
Check whether a document follows JSON syntax before using it in an application or API request. A successful check reports the shape of the parsed data.
- Paste the JSON you want to check.
- Run the validator.
- Fix any syntax errors in your source and validate again.
Good to know
- Syntax validation does not prove that data matches a schema or is trustworthy.
- The parser accepts duplicate keys and retains the last value.
- Documents beyond the shared size, complexity, or finite JavaScript numeric range are rejected, even when the numeric spelling follows JSON syntax.
Check JSON syntax before applying an application schema
Paste the object below and run the validator. It is valid JSON with an object root, two primitive member values and maximum depth one. The value count includes the root itself, so the accompanying statistics report three values. Then try adding a comma after 3: that version must fail because standard JSON has no trailing commas. Correct the original text yourself and run again. A successful syntax result is the first check when preparing a request body, rather than proof that the receiving application accepts its settings.
Valid JSON example
{"enabled":true,"retries":3}Expected result text
Valid JSON. This checks JSON syntax only, not an application schema.
- For this example, the separate statistics show Root type object, Values 3 and Maximum depth 1.
- This parser accepts duplicate keys and retains the last value; a success message is not a duplicate-member audit.
- Numbers use JavaScript precision. Keep large identifiers as strings when exact decimal digits matter. Comments, auto-repair and application-schema validation are not provided here.
Common questions
Are comments allowed?
No. Standard JSON does not allow comments or trailing commas.
Can a JSON document be a single number?
Yes. Strings, numbers, booleans, arrays, objects, and null can all be valid JSON roots.
Keep going with related tools
All developer →JSON Formatter
Format and indent valid JSON in your browser, with downloadable output and clear syntax errors.
DeveloperJSON Viewer
Inspect a JSON document as a safe path, type, and value tree without executing its contents.
DeveloperJSON-RPC Envelope and Batch Workbench
Inspect JSON-RPC 2.0 envelopes or correlate supplied batch replies with exact request IDs.
DataSupported JSON Schema Validator
Validate a clearly listed JSON Schema subset, rejecting every unsupported keyword and all references.
DataJSON to TypeScript
Infer a TypeScript type alias from a JSON sample, including nested objects and array unions.
DataJSON String Escaper
Encode text as a JSON string literal or decode one JSON string into readable text.