JSON Validator

Check if your JSON is valid and see helpful error details.

Something not working, or a feature missing?Report a problem or suggest a tool

How to Use

  1. 1Paste your JSON into the input box.
  2. 2Click "Validate".
  3. 3Review the result, valid JSON is confirmed, invalid JSON shows the error message.

Features

  • Instant client-side validation
  • Clear, specific error messages
  • Works with deeply nested JSON

Example

Input

{"a": 1, "b": }

Output

Invalid JSON: Unexpected token '}' at position 14

Validate JSON syntax instantly and get a clear, specific error message, with the line and column when your browser reports them, instead of a generic "invalid JSON" response.

Check JSON before it breaks something

A single misplaced comma in a config file can stop an application from starting, and an invalid request body produces an unhelpful “400 Bad Request”. The validator parses your JSON with the same strict parser browsers use and either confirms it is valid or reports the error, with its line and column when your browser gives them.

Reading error messages

  • Unexpected token usually means a character that should not be there: a trailing comma, a single quote or a comment.
  • Unexpected end of JSON input means something was not closed, typically a missing } or ] at the end, or text that was cut off when copying.
  • Bad control character in string means a raw tab or line break inside a string. Write it as \t or \n instead.
  • When a position is reported, it is where the parser gave up, which is often just after the real mistake. Look at the line above too.

Syntax versus schema

This tool checks syntax, meaning whether the text is valid JSON at all. It does not check whether the data has the right shape for a particular API, such as whether a required field is present or a value has the correct type. That is what JSON Schema validators do. Valid syntax is the first step either way.

Where JSON errors usually come from

  • Hand-edited config files, such as package.json, tsconfig.json and VS Code settings.
  • JSON built by concatenating strings in code instead of using a serializer.
  • Copying JSON from chat apps or documents that replace straight quotes with curly “smart” quotes.
  • Log lines that were truncated.

Once it is valid, the JSON Formatter makes it readable and the JSON Minifier makes it compact.

Frequently Asked Questions