JSON Validator

Paste JSON and click Validate. Valid JSON is formatted for you; invalid JSON shows the line, the column and what went wrong, with a Repair button for the common mistakes.

Editor (Formatted View)
1
Ready — paste or type JSON here
Viewer
Tree view will appear here after formatting
Ready

How to validate JSON

  1. Paste your JSON into the editor, or drop a .json file on it.
  2. Click Validate (or press Ctrl+Enter).
  3. If the JSON is valid, it is re-indented so it's easy to read. If not, the error message gives the exact line and column and shows the lines around it, with a ^ marker under the character where parsing failed.
  4. Click Repair to fix the usual problems automatically, then validate again.

The most common JSON errors

ErrorExampleFix
Trailing comma{"a": 1,}Remove the last comma
Single quotes{'a': 'x'}JSON only allows double quotes
Unquoted key{a: 1}Put keys in double quotes: "a"
Comments// noteJSON has no comments; remove them
Missing comma{"a": 1 "b": 2}Separate items with commas
True, None, NaNPython or JavaScript valuesUse true, false and null
Unescaped charactersA raw line break or " inside a stringWrite \n and \"

Repair fixes all of these: it adds missing commas and quotes, removes comments and trailing commas, converts single quotes, and closes brackets that were cut off.

Syntax validation vs schema validation

This page checks syntax: whether the text is JSON at all. To check that valid JSON also has the right shape (required fields, types, allowed values), use the JSON Schema validator, which lists every value that breaks a rule, by path.

Exact numbers, private data

Many online validators run JSON through JavaScript's own parser, which silently rounds long numbers such as 19-digit IDs. This validator keeps every digit exactly as you typed it. Validation runs in your browser, so the JSON you paste isn't uploaded.

Frequently asked questions

How do I know if my JSON is valid?

Paste it into the editor above and click Validate. Valid JSON is re-indented; invalid JSON shows an error with the exact line and column where parsing failed.

What does "Unexpected token" mean?

The parser found a character it did not expect at that position, usually a missing comma, a stray quote, a single quote instead of a double quote, or a comment. Look at the character just before the reported position.

Can it fix my JSON automatically?

Yes. Click Repair to add missing commas and quotes, remove trailing commas and comments, convert single quotes and close unclosed brackets. Check the result, because repair has to guess what was intended.

Does it validate against a JSON Schema?

This page checks syntax only. For schema validation, use the JSON Schema tool, which supports drafts 4 to 2020-12.

Is my JSON uploaded?

No. Validation, formatting and repair run in your browser.

Other tools

Share Content

Choose what to share and generate an instant link

🔥 One-time link Content deleted from server after first view
✉️
Uploading to server…