Skip to main content

JSON Validator

Validate JSON online and find syntax errors with clear line and column details. Paste JSON to check whether it is valid.

Your tool input is processed locally in your browser—not uploaded to or stored by Bitty Coder. Privacy Policy

JSON input

Not checked Strict JSON

What is a JSON validator?

A JSON validator checks whether text follows standard JSON syntax. It catches problems such as missing commas, unclosed brackets, single quotes, invalid escapes, comments, and malformed numbers.

This validator accepts any value allowed by RFC 8259 at the document root, including an object, array, string, number, boolean, or null. It checks syntax only; valid JSON can still contain the wrong fields or values for an API.

How to validate JSON

  1. Paste or type JSON in the editor, or select Example.
  2. Wait for automatic validation or select Validate JSON.
  3. Review the result. If the JSON is invalid, select a diagnostic to move to its line and column.

Editing the input clears the previous result until validation runs again.

JSON validation example

This JSON is invalid because the last property has a trailing comma:

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

Remove the trailing comma to make it valid:

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

Common JSON syntax errors

ErrorWhy it is invalid
Trailing commaThe final property or array item ends with a comma.
Single quotesJSON keys and strings must use double quotes.
Unquoted keyEvery object key must be a double-quoted string.
Missing commaAdjacent properties or array items are not separated.
Unclosed structureA string, object, or array is missing its closing character.
CommentStandard JSON does not allow comments.
Invalid numberLeading zeros, NaN, and Infinity are not valid JSON numbers.

JSON validator vs formatter vs Schema validator

ToolPrimary purpose
JSON ValidatorCheck whether text follows strict JSON syntax and locate errors.
JSON FormatterAdd indentation and line breaks to valid JSON.
JSON Schema ValidatorCheck fields, types, required values, and other structural rules.

Formatting changes whitespace, while validation leaves the input unchanged. Schema validation is a separate task performed after the JSON syntax is valid.

JSON validator FAQ

Can a JSON document start with an array or primitive value?

Yes. An array, string, number, boolean, or null can be a complete JSON document; the root does not have to be an object.

Are duplicate keys valid JSON?

Duplicate object keys are syntactically accepted, but different software may keep different values. This validator reports them as compatibility warnings rather than syntax errors.

Does valid JSON mean an API will accept it?

No. Valid JSON only confirms that the text follows JSON syntax. An API may still require specific fields, types, formats, or business rules.