Tool workspace

JSON Validator

Input

Check whether your JSON is correctly formatted and ready to use. Paste your data, enter it manually, or upload a .json file to detect syntax errors. You can also provide a JSON Schema to check whether your data follows common structural and value rules.

Input

Output

Loading tool

Loading tool

Developer Tools

JSON Validator

Check whether your JSON is correctly formatted and ready to use. Paste your data, enter it manually, or upload a .json file to detect syntax errors. You can also provide a JSON Schema to check whether your data follows common structural and value rules.

Quick guide

How to use

Enter your JSON: Paste or type JSON into the input editor, or upload a .json file. You can also drag and drop a file into the tool.

Check the syntax: The validator checks whether the document follows JSON syntax rules and reports parsing errors when it finds invalid input.

Review the document summary: See the root data type, number of values, maximum nesting depth, and document size.

Validate against a JSON Schema (optional): Provide a schema to check whether your JSON follows expected data types, fields, and other supported rules.

Export the report: Copy the validation report or download it for later reference.

Details

About this tool

Check whether your JSON is correctly formatted and ready to use. Paste your data, enter it manually, or upload a .json file to detect syntax errors. You can also provide a JSON Schema to check whether your data follows common structural and value rules.

What Is JSON Validation?

JSON validation is the process of checking whether a JSON document follows the rules required for it to be used reliably.

JSON, short for JavaScript Object Notation, is a text format commonly used to exchange structured data between applications. It is frequently found in API responses, application settings, configuration files, and data storage systems.

A JSON validator helps identify problems before the data is processed by an application. This can save debugging time and make it easier to work with structured information.

JSON Syntax Validation vs. JSON Schema Validation

These are two different checks.

JSON Syntax Validation

Syntax validation checks whether your document is valid JSON. It identifies formatting and structural problems such as:

Missing commas between values

Missing or unmatched quotation marks

Incorrect brackets or braces

Invalid property names

Trailing commas

Invalid JSON values

For example, this is valid JSON:

{

"name": "Alex",

"age": 28,

"active": true

}

But this is invalid because the property name is not enclosed in double quotes:

{

name: "Alex",

"age": 28

}

The validator reports parsing errors and includes line and column information when the browser provides an error position.

JSON Schema Validation

A document can be valid JSON but still contain unexpected fields, incorrect value types, or missing information.

JSON Schema provides a way to describe the expected structure and rules for your data. When you supply a schema, this tool can check common rules such as:

Type: Check whether a value is a string, number, integer, boolean, array, object, or null.

Required: Check whether required object properties are present.

Properties: Define validation rules for individual object properties.

Additional properties: Control whether object properties outside the defined set are allowed.

Items: Validate the contents of arrays.

Enum and const: Restrict values to a list of permitted options or one specific value.

String rules: Check minimum and maximum string lengths and regular expression patterns.

Number rules: Check minimum and maximum numeric values.

Array rules: Check minimum and maximum item counts and whether items must be unique.

Object rules: Check minimum and maximum numbers of properties.

The schema checker supports these common rules, not the complete JSON Schema specification. Results should be interpreted within the supported feature set.

Example: Validate JSON with a Schema

Suppose an application expects a user record with a name, email address, and age.

A JSON document might look like this:

{

"name": "Alex",

"email": "alex@example.com",

"age": 28

}

A corresponding schema could define the required fields and their expected types:

{

"type": "object",

"required": ["name", "email", "age"],

"properties": {

"name": {

"type": "string"

},

"email": {

"type": "string"

},

"age": {

"type": "integer",

"minimum": 18

}

}

}

With this schema, the validator can check that all three properties exist, that their values have the expected types, and that the age is at least 18.

When Should You Validate JSON?

A JSON validator is useful in several common development and data-handling situations:

Checking API responses: Confirm that returned data is valid JSON before using it in an application.

Reviewing configuration files: Find syntax errors in JSON settings before loading them into a project.

Testing structured data: Check whether objects and arrays follow an expected structure.

Debugging application issues: Identify missing fields, incorrect value types, and other data problems.

Preparing data for integration: Validate JSON before sending it to another application or service.

Practical inputs

Examples JSON

Example: Validate JSON with a Schema

Suppose an application expects a user record with a name, email address, and age. A JSON document might look like this: { "name": "Alex", "email": "alex@example.com", "age": 28 } A corresponding schema could define the required fields and their expected types: { "type": "object", "required": ["name", "email", "age"], "properties": { "name": { "type": "string" }, "email": { "type": "string" }, "age": { "type": "integer", "minimum": 18 } } } With this schema, the validator can check that all three properties exist, that their values have the expected types, and that the age is at least 18.

Help

Frequently asked questions

What does a JSON validator do?

A JSON validator checks whether a document follows JSON syntax rules. It can also check the document against a supplied JSON Schema to verify supported structural and value requirements.

Is valid JSON the same as valid JSON Schema data?

No. Valid JSON only means the document follows JSON syntax. Schema validation checks whether the data also meets specified requirements, such as required fields, value types, and permitted ranges.

Can I validate JSON against a JSON Schema?

Yes. You can provide a JSON Schema to check your document against supported rules, including types, required properties, array constraints, string patterns, and numeric limits.

Does this tool support the full JSON Schema specification?

No. The schema checker supports common validation rules, but it does not implement every JSON Schema feature. Complex schemas may require a validator with broader specification support.

Can I validate a JSON file?

Yes. You can upload a .json file or drag and drop it into the tool. You can also paste or type JSON directly.

Does the JSON Validator fix errors automatically?

No. The tool identifies syntax and supported schema validation errors, but it does not automatically repair your JSON. You need to edit the input and validate it again.

Is my JSON uploaded to a server?

No. The JSON document is not sent to ToolboxShelf's server for validation.

What information does the validation report include?

The report summarizes the validation results and document details, including the root type, value count, maximum depth, and file size. You can copy or download the report.