JSON Validator

Find the exact line and column of a JSON error, and fix it.

JSON

Validation

Formatted JSON appears here as soon as you paste it.
Runs on this device. Nothing is uploaded.

About the JSON Validator

Check whether JSON is valid and, when it is not, see exactly where it breaks: the line, the column, the code around it, and a message that says what was expected. Browsers word JSON errors differently and Safari gives no position at all, so the validator runs its own strict scan to find the spot every time.

How to use it

  1. Paste the JSON.
  2. Read the result: valid, or the error with its position.
  3. Click Repair to fix common mistakes, then validate again.

Example

Input
{"a": 1, "b": 2,}
Result
Line 1, column 17: Trailing comma before }

Questions

What are the most common JSON errors?

Trailing commas after the last item, single quotes instead of double quotes, keys without quotes, comments, and a missing comma between two items. JSON allows none of them.

Does it validate against a JSON Schema?

Not yet. It checks that the text is valid JSON syntax (RFC 8259). Schema validation is planned.

Is JSON with comments valid?

Standard JSON does not allow comments. JSONC (used by VS Code settings) and JSON5 do. Repair removes comments to make the text standard JSON.

Related tools