Skip to content

JSON validator

Check JSON syntax, inspect value types and nesting depth, and save a clear local validation report.

Source
Live validation
Valid JSON

Your document is valid within this tool’s limits.

11Values
2Deepest level
objectRoot type
object2
array1
null1
string5
number1
boolean1
Processed on your device

How it works & useful details

How it works

Check strict JSON syntax without changing your document. Comments, trailing commas, single-quoted strings and unquoted keys are not JSON. This checks syntax and supported size/number limits; it does not validate against a JSON Schema.

Limits & privacy

Up to 1,000,000 characters, 50,000 values and 64 levels. Live previews pause above 40,000 characters; run the tool to process the full supported input. Imported files must be UTF-8 and under 1 MB. Your data stays on this device.

Numbers use JavaScript decimal precision. Unsupported large integers are rejected; quote identifiers to keep all digits. Duplicate object names keep their last value. Transforms preserve data, not source whitespace or number spelling.

Paths use JSON Pointer: an empty path selects the root, ~0 escapes a tilde, and ~1 escapes a slash.

About this tool

JSON validator checks a document for syntax errors, reports value types and nesting depth, and saves a clear local report. It is the first thing to run when a configuration file or API payload behaves unexpectedly.

Parsing uses JavaScript number semantics, so numbers outside the safe integer range are flagged rather than silently losing digits. Everything is validated locally and nothing is sent anywhere.

How to use it

  1. Paste the JSON document.
  2. Validate to see syntax errors with their position.
  3. Review the type and depth summary for the parsed value.
  4. Save the report or fix the document and validate again.

Worked examples

{"id": 42, "price": 19.99, "items": [1, 2, {"deep": [true]}], "note": null}

is valid: the root is an object with 10 values and a maximum depth of 4.

{"name": "Ada", "tags": ["a", "b",], }

is invalid because of the trailing commas. JavaScript accepts them, JSON does not.

{"id": 9007199254740993}

is syntactically valid, but the validator flags it: the integer is beyond ±9,007,199,254,740,991, the largest integer JavaScript and many other JSON parsers can represent exactly. It would silently be read as 9007199254740992.

The usual suspects

  • Comments, trailing commas, single quotes, and unquoted keys. These are valid in JavaScript and JSON5, but not in JSON.
  • Smart quotes (“ ”) pasted from a word processor or chat app instead of straight quotes.
  • Unescaped control characters or raw line breaks inside strings. Use \n instead.
  • NaN, Infinity, and undefined, which have no JSON representation.
  • Large numeric IDs. Send them as strings, as the Twitter and Discord APIs do, to keep every digit.

Syntax validity is only the first check. Whether the document has the fields and types an application expects is a question for a JSON Schema validator or the application's own tests.

Frequently asked questions

Why is a large integer flagged?

JavaScript cannot represent all large integers exactly, so quoting the value as a string is the reliable way to keep every digit.

Does it check a JSON Schema?

No. It validates syntax and structure, not conformance to a schema; use a schema validator for contract checks.

What is the limit?

Up to 1,000,000 characters, 50,000 values, and 64 levels of nesting.

Does validating change my JSON?

No. The document is only parsed and inspected. Use format JSON or sort keys if you want to rewrite it.