← All tools
// Data / Developer

JSON Validator online

Validate JSON and display detailed error messages — browser-side

JSON Validator logo
by
CHUNKY
MUNSTER
// JSON input

How to Use the JSON Validator

  1. Paste or type JSON into the input box.
  2. Validation runs on every keystroke — no submit button.
  3. On success a green tick appears with type, key count and byte size.
  4. On failure the red badge shows the JSON.parse error message verbatim.

JSON Validator hands your input straight to the browser's native JSON.parse, so the verdict matches what every Node, Deno or browser fetch() call will produce. Any deviation from RFC 8259 — trailing commas, single-quoted keys, NaN, comments — is rejected immediately, with the parser's own error message shown in red.

How the JSON Validator Works

On a successful parse the tool walks the resulting tree and reports the type (Object or Array), the total number of keys plus primitive array values, and the byte size of the input. That makes it useful for quick sanity checks on API responses, config files and JSON Schema documents. Nothing is uploaded — JSON.parse runs locally.

Frequently Asked Questions

Which JSON dialect does this validator accept?

Strict RFC 8259 / ECMA-404, the same grammar used by JSON.parse in every modern browser. Trailing commas, comments, single-quoted strings and unquoted keys are all rejected — those belong to JSON5 or JSONC, not JSON.

Will it accept JSON with comments (JSONC)?

No. JSON.parse rejects // and /* */ comments. Strip them out first or paste the file into a JSONC-aware tool. Most config files labelled .json that allow comments are technically JSONC, not JSON.

What does the key/value count include?

It walks the parsed structure recursively and counts every key in every object plus every primitive value inside arrays. Nested objects contribute their own keys to the running total, so {"a":{"b":1}} reports 2.

Why does my error not show a line number?

JSON.parse error formats vary by browser. Chrome and Edge usually include 'at position N'; Firefox includes a line/column. The validator displays whatever the engine returns — for richer position info paste the input into a JSON Schema validator.

Explore the full suite of Data tools and 290+ other free utilities at Chunky Munster.