Skip to main content

JSON Validator

Find out exactly what is wrong, and where.

Paste JSON and get an immediate verdict. When something is wrong, Jsonviewpro tells you the line, the column, the character that broke the parse and why it is not allowed — not just “unexpected token at position 582”.

Input JSON

Size: 0 BLines: 0

Paste JSON to validate it

The verdict updates as you type — nothing is uploaded.

What makes JSON valid?

A valid JSON document is exactly one value: an object, an array, a string, a number, true, false or null. Strings use double quotes. Object keys are strings. Numbers follow the JSON grammar — no leading zeros, no hexadecimal, no NaN or Infinity.

There are no comments, no trailing commas and no single quotes. Anything a JavaScript engine would accept in source code but the JSON grammar does not is a syntax error.

How to validate JSON

  • Paste, upload or drop your document into the editor.
  • The verdict updates as you type — a green badge for valid JSON, a red panel with line and column for errors.
  • Use “Go to line” to jump the cursor straight to the problem.
  • Fix the issue, or apply the suggested repair when Jsonviewpro can determine one safely.

Common JSON errors and how to fix them

  • Trailing comma — remove the comma after the last item in an object or array.
  • Single quotes — JSON strings must use double quotes.
  • Unquoted keys — every property name needs double quotes.
  • Comments — // and /* */ are not part of JSON; strip them or use JSONC in an editor that supports it.
  • Python or JavaScript literals — replace True, False, None, undefined and NaN with true, false and null.
  • Unterminated string — a quote was opened but never closed, often after an unescaped backslash.
  • Missing comma — two values sit next to each other with no separator.

Validating against a JSON Schema

Syntax validity is only half the question. Schema validation checks that a document has the fields your system expects, of the right types, within the right ranges. Paste a schema and Jsonviewpro validates your document against it in your browser, reporting each violation with its exact path.

If you do not have a schema yet, the JSON Schema generator can infer a first draft from a sample document.

Frequently asked questions

Why does my JSON fail when it works in JavaScript?
JavaScript object literals are a superset of JSON. Unquoted keys, single quotes, trailing commas, comments and values such as undefined are all legal JavaScript but invalid JSON.
Can Jsonviewpro fix my JSON automatically?
It can suggest a repair for unambiguous problems — trailing commas, single quotes, comments, unquoted keys and Python literals — and shows you exactly what it changed. Nothing is applied without you asking.
Does the validator support JSON Schema?
Yes. Paste a schema alongside your document and Jsonviewpro checks it locally, supporting drafts 04, 07, 2019-09 and 2020-12. The validator interprets the schema rather than compiling it to JavaScript, so it works under a strict Content-Security-Policy.
Is my data sent anywhere for validation?
No. Validation runs in your browser. Nothing about your document leaves the tab.