JSON Validator

Check whether a JSON document is valid and locate syntax errors.

JSON to validate

Valid JSON

About JSON Validator

A validator answers one question quickly: can this document be parsed? That is usually what you need when an API rejects a payload or a config file refuses to load.

When the document is invalid the reported line and column point at the first character the parser could not accept — the actual mistake is often just before it, such as a missing comma or an unclosed bracket.

How to use JSON Validator

  1. 1Paste or type your JSON into the input area
  2. 2The validator checks the JSON immediately
  3. 3If valid, you'll see a green checkmark and confirmation
  4. 4If invalid, you'll see an error message with the exact line and column number
  5. 5Check just before the error position for the actual mistake

Example

Valid JSON

Input

{"name": "Alice", "age": 28, "active": true, "tags": ["admin", "user"]}

Output

✓ Valid JSON

Invalid JSON (trailing comma)

Input

{"name": "Alice", "age": 28,}

Output

✗ Invalid: Unexpected token } at position 28

When to use JSON Validator

  • Checking JSON from an API response before processing
  • Validating JSON configuration files before deployment
  • Finding syntax errors in manually-edited JSON
  • Confirming a JSON file is valid before committing
  • Debugging JSON parsing errors in applications

Common errors & troubleshooting

Unexpected token } at position X

There's likely a trailing comma before the closing brace or bracket. Remove it.

Unterminated string starting at position X

A string is missing its closing double quote. Check the line and find the unclosed string.

Unexpected token : at position X

Keys must be in double quotes. Check that your key is properly quoted.

Limitations & details

  • Validates JSON syntax only, not against a schema
  • Does not check if values make semantic sense for your application
  • Comments (// or /* */) are not allowed in standard JSON
  • Very large files may be slow to validate depending on browser memory

Frequently asked questions

Related guides

Related tools

JSON Formatter

Formatters

Format, beautify and validate JSON with clear error messages.

Open Tool

SQL Formatter

Formatters

Format and minify SQL queries for several dialects.

Open Tool

JSON to YAML

Converters

Convert JSON documents into readable YAML.

Open Tool

YAML to JSON

Converters

Parse YAML and convert it into formatted JSON.

Open Tool