Skip to content
epitometool

JSON schema validator

JSON & data

Validate JSON against a JSON Schema, see errors inline.

Updated

JSON to validate

Valid JSON ✓

Structure

Objects
2
Arrays
1
Strings
5
Numbers
1
Booleans
1
Nulls
0
Depth
2

JSON Schema (optional)

Quick start

How to validate JSON

Paste JSON, see parse status, structure stats and duplicate-key warnings. Optionally check against a JSON Schema.

  1. Step 1
    Paste JSON

    Drop your JSON into the textarea. Parse errors show line and column; valid JSON shows a green badge.

  2. Step 2
    Read structure stats

    Counts of each value type plus max depth — useful for spotting accidentally-deep nesting or unexpected null fields.

  3. Step 3
    Optionally check schema

    Enable the schema panel and paste a JSON Schema to validate types, required fields, ranges and enums.

In-depth guide

JSON validator with structure stats and optional schema check

Paste JSON and immediately see whether it parses, where the error is if not, what's inside (counts of objects, arrays, strings, numbers, max depth), and whether any keys are duplicated. Optionally check it against a JSON Schema document.

What counts as valid JSON

RFC 8259 is strict. Common mistakes that fail validation:

  • Trailing commas[1, 2, 3,] is invalid.
  • Single quotes — strings must use double quotes.
  • Comments — // and /* */ are not JSON.
  • Unquoted keys — object keys must be quoted strings.
  • Numbers with leading zeros0123 is invalid (octal-looking).
  • NaN, Infinity, undefined — not representable in JSON.

Why duplicate keys are a silent disaster

RFC 8259 says implementations "should" reject duplicate object keys but most don't. JSON.parse keeps the last value, jq the first, Python the last, Go errors out — every parser is different.

If your config has accidentally duplicated keys, the value you see in production may not be the value in your file. This tool re-scans the raw text and flags duplicates so you catch them before they ship.

Schema validation

Toggle the schema panel and paste a JSON Schema document. We support a practical subset suitable for shape-checking API payloads:

  • type — string, number, integer, boolean, null, array, object (or array of these).
  • required — array of property names that must be present.
  • properties — recursive schemas keyed by property name.
  • items — recursive schema for each array element.
  • enum, minimum, maximum, minLength, maxLength.

For richer validation (oneOf, allOf, $ref, format) use a library like ajv inside your codebase.

Frequently asked questions

Does this tool send my JSON anywhere?

No. Parsing and validation run in your browser. Useful for checking sensitive payloads without uploading them to a hosted validator.

What does 'structurally valid' mean?

The text parses as JSON per the official grammar (RFC 8259) — balanced braces, proper string escaping, no trailing commas, no comments. The tool also surfaces a tree-walk summary: counts of each value type and maximum nesting depth.

Why does it warn about duplicate keys?

JSON technically allows duplicate keys, but JSON.parse silently keeps only the last value — which is almost always a bug. We re-scan the raw text and flag duplicates so you can spot them before they cause data loss.

Which JSON Schema features are supported?

A practical subset: type, required, properties, items, enum, minimum, maximum, minLength, maxLength. Enough to validate common API payloads. For full Draft-07 / 2020-12 support use a dedicated validator like ajv.

Where do parse errors point to?

We extract the byte offset from the engine's error message and convert it to line and column numbers. Note: V8 (Chrome) gives a position; Firefox gives a line/column directly — both work.

What about JSON5, JSONC and comments?

Not supported — this tool validates strict JSON only. Strip comments and trailing commas before pasting.

Keep exploring

More tools you'll like

Hand-picked utilities that pair well with the one you're on — all free, client-side, and zero-signup.