/

JSON Validator

Processed Client Side

Validate JSON syntax and get clear, precise error messages with line and column positions.

Input · 10 lines
10 lines · 161 charsLength: 161Lines: 10Size: 161 BytesCursor: 1:1
Validation result
Valid
Valid JSON
No syntax errors found
Root typeobject
Total keys7
Max depth3
Size (chars)161
Lines10
Valid

Bookmark this tool now — skip the search next time you need it.

About JSON Validator

This tool runs entirely in your browser. Whatever you paste is processed on your own device and is never uploaded, logged, or sent to any server.

Check whether a block of JSON is actually valid, and get a structural readout of it when it is. Paste the text and the validator either confirms it parses or tells you exactly where it broke, with the line number and the parser message rather than a generic failure. When it is valid you also get the shape of the document at a glance: the root type, how many keys it contains in total, how deeply it nests, its size in characters, and its line count. That makes it useful not just for catching syntax errors but for sizing up an unfamiliar API response before you write code against it.

Key features

  • Strict validation against the JSON specification using the browser native parser
  • Precise error reporting — the line number where parsing failed, plus the underlying parser message
  • Clear Valid / Invalid status badge so the result is unambiguous
  • Structure summary: root type, total key count, maximum nesting depth, size in characters, and line count
  • Syntax-highlighted input so mismatched brackets and unterminated strings are visible as you scan
  • No schema required — this validates JSON syntax, which is the check you need before any schema check can run
  • Works on large payloads entirely in memory, with no upload and no file-size ceiling
  • Pairs with the JSON Schema Validator when you need to check content and not just syntax

How to use it

  1. Paste the JSON you want to check into the input pane.
  2. Click Validate — the status badge shows Valid or Invalid immediately.
  3. If it is invalid, jump to the reported line and fix the syntax error there or on the line above it.
  4. If it is valid, read the structure panel for root type, key count, depth, size, and lines.
  5. Re-validate after each fix until the badge turns green.

Tips & common mistakes

  • Maximum depth is a useful smell test: a payload nesting more than five or six levels deep is usually worth flattening before you model it in code.
  • Total keys tells you whether an API response is genuinely large or just verbosely formatted — size in characters counts whitespace, key count does not.
  • A root type of array means you should be iterating, not indexing by key. It is the single most common cause of "undefined is not a function" when consuming a new endpoint.
  • Valid JSON is not the same as correct JSON. Once syntax passes, use the JSON Schema Validator to check that required fields exist and types match what your code expects.
  • If validation fails on the very first character, you probably copied an HTML error page instead of a JSON response — a 500 page starts with < rather than { or [.
  • Duplicate keys are technically parseable: JSON.parse silently keeps the last one. If a value is mysteriously wrong, search the input for a second copy of that key.

Related tools

Browse all 24 JSON tools

Frequently asked questions

9

Paste your JSON into the editor and it is validated instantly. A green checkmark means valid JSON; a red error shows the exact line and column where the issue is.

The validator only checks whether your JSON is syntactically correct and reports errors. The formatter also reformats valid JSON with your chosen indentation.

No — it validates strict JSON per RFC 8259. Comments, trailing commas, and unquoted keys are not valid JSON and will be flagged as errors.

The error message shows the exact line number and column where the syntax error was detected, and the problematic line is highlighted red in the editor.

Root type says whether the document is an object or an array, total keys counts every key at every depth, max depth shows how deeply it nests, and size and line count describe its physical size. Together they let you size up an unfamiliar API response before writing code against it.

No — this checks JSON syntax, which is the step that has to pass before any schema check can run. To verify required fields, types, and value constraints, use the JSON Schema Validator instead.

You have most likely captured an HTML error page rather than a JSON response. A 500 or 404 page starts with a < character, where valid JSON starts with { or [.

It still parses. The specification does not forbid duplicate keys and the parser silently keeps the last occurrence. If a value is inexplicably wrong, search the input for a second copy of that key.

No fixed limit is imposed. Validation runs in memory in your browser with no upload, so the practical ceiling is your available memory rather than a server-side cap.