Tools
EN

JSON Validator

Paste JSON to check whether it is valid. Errors are reported with line, column and a plain-English explanation, the line is highlighted, and Repair fixes the most common mistakes in one click.

Private: your data is processed in your browser and never uploaded.

How to validate JSON

  1. Paste the JSON or open a file. Validation runs automatically while you type.
  2. A green “Valid JSON” message with statistics means the document is correct. Otherwise read the error: it names the line, the column and what was expected there.
  3. Fix the highlighted line or click Repair, then Format the result to make it easy to read.

Common JSON errors and how to fix them

ErrorExampleFix
Trailing comma[1, 2, ]Remove the comma before ] or }
Single quotes{'name': 'Ada'}Use double quotes: {"name": "Ada"}
Unquoted key{name: "Ada"}Quote the key: {"name": "Ada"}
Missing comma{"a": 1 "b": 2}Add a comma between the properties
Comment// settingsJSON has no comments – remove them
Line break in a string"line 1⏎line 2"Write \n instead of a real line break
Invalid valueundefined, NaN, TrueUse null, a number, true or false
Leading zero{"zip": 01234}Write 1234, or keep it as text: "01234"
Missing bracket{"a": [1, 2}Close every [ with ] and every { with }

What makes JSON valid

JSON is defined in RFC 8259. A valid document follows a few strict rules:

Validate JSON on the command line

Frequently asked questions

What is the difference between a JSON validator and a JSON linter?

A validator checks whether text follows the JSON syntax. A linter usually also enforces a consistent style. This JSON checker validates strictly against RFC 8259 and, with Format, gives you consistent indentation as well.

Can it validate against a JSON Schema?

This page checks syntax. To describe the expected structure of your data, create a schema from an example document with our JSON Schema generator.

Why is my JSON valid here but rejected by another program?

Programs often expect a specific structure (certain keys or types), a particular encoding such as UTF-8 without a byte order mark, or numbers within a limited range. Syntactically valid JSON can still break such application rules.

Is JSON with comments (JSONC) valid?

No. Standard JSON does not allow comments. Some editors accept them in settings files (JSONC), but APIs and JSON.parse do not. Repair removes comments for you.