How to Validate JSON Against a Schema Online
JSON Schema is a standard for describing the structure and validation rules for JSON data. It lets you define required fields, data types, value constraints, and patterns that valid JSON must follow. Validating JSON against a schema is essential for API development, configuration validation, and data quality assurance. This guide shows you how to validate JSON against schemas using fixie.tools — a free JSON Schema validator with detailed error reporting.
Step 1: Open the JSON Schema Validator
Go to fixie.tools/json-schema in your browser. The tool validates JSON locally in your browser with no server uploads, keeping your data private and providing instant validation results.
Step 2: Enter Your JSON Schema
In the schema input area, paste or type your JSON Schema definition. This describes what your valid JSON should look like — required properties, data types, allowed values, string patterns, array constraints, and more. If you don't have a schema yet, use the example schemas provided or consult the JSON Schema specification. The tool supports JSON Schema Draft 7, which is the most widely used version.
Step 3: Paste Your JSON Data
In the data input area, enter the JSON you want to validate against your schema. This could be an API request payload, configuration file, form submission data, or any JSON you need to verify matches the expected structure. The tool validates syntax first, then checks the data against your schema rules.
Step 4: Review Validation Results
The tool instantly validates your JSON and displays results. If validation succeeds, you'll see a green success message confirming the JSON conforms to the schema. If validation fails, you'll see detailed error messages showing exactly what's wrong: missing required properties, incorrect data types, values outside allowed ranges, or pattern mismatches. Each error includes the JSON path where the problem occurred, making it easy to locate and fix issues.
Step 5: Fix Errors and Revalidate
Use the error messages to correct your JSON or schema. Common issues include misspelled property names, wrong data types (string instead of number), missing required fields, or values that don't match enum constraints. Edit your JSON or schema and the tool revalidates automatically in real-time. Once all errors are fixed, you'll see the validation success message.