Loading Avro Schema Validator...

How to Validate Avro Schemas - Complete Guide

Step 1

Input Your Avro Schema

Get your Apache Avro schema ready for validation. You have several convenient options:

•
Paste directly: Copy your Avro schema from your IDE or schema registry
•
Upload file: Click the Upload button to select an .avsc or .json file
•
Try sample: Click the Sample button to see a working example schema

Example Avro schema:

{
  "type": "record",
  "name": "User",
  "namespace": "com.example.avro",
  "fields": [
    { "name": "id", "type": "int" },
    { "name": "name", "type": "string" },
    { "name": "active", "type": "boolean" }
  ]
}
Step 2

Automatic Schema Validation

Watch as your Avro schema is validated in real-time using the official avsc library. The validator checks for:

•
JSON syntax: Ensures proper JSON structure with matching brackets and commas
•
Schema structure: Validates record type, name, namespace, and fields
•
Type validation: Checks all field types are valid Avro types (int, long, float, double, string, boolean, etc.)
•
Nested structures: Validates complex nested records and arrays
•
Default values: Every default has to fit its field's type, and a union's default has to match its first branch, the same rule Kafka Schema Registry applies when you register a schema. Compatibility with versions already in your registry is not checked here.
Step 3

Download or Copy Validated Schema

Once your schema is validated, you can easily save or share it:

•
Copy to clipboard: One-click copying for quick pasting into your code or schema registry
•
Download as file: Save as an .avsc file for version control
•
Real-time validation: Instant feedback as you type or edit your schema

Use your validated schema in:

•
Apache Kafka: Register with Kafka Schema Registry for data streaming
•
Hadoop ecosystem: Use with Hive, Pig, Spark for big data processing
•
Data pipelines: Ensure data integrity in ETL processes

What is an Avro Schema?

An Avro schema is a JSON document that defines the structure and data types of your data. Created by Apache, Avro schemas enable:

  • •Schema evolution: Backward and forward compatibility as your data structure changes
  • •Data validation: Type checking and structure enforcement at serialization time
  • •Efficient encoding: Compact binary serialization for fast data transfer
  • •Language interoperability: Use the same schema across Java, Python, C++, and more

Frequently Asked Questions

How do I validate an Avro schema?

Paste the schema into the editor or upload an .avsc or .json file. It is checked as you type: first as JSON, then with the avsc library against the Avro specification. If something is wrong you get the field it concerns and, for JSON mistakes, the line and column.

What Avro types are supported?

All the primitive types (null, boolean, int, long, float, double, bytes, string) and the complex ones (record, enum, array, map, union, fixed), including nested and recursive records, named-type references, namespaces and aliases. Logical types such as decimal, date, timestamp-millis and uuid are accepted, and a decimal whose scale or precision readers would ignore gets a warning.

Does a valid result mean Kafka Schema Registry will accept it?

It means the schema itself is well formed, which is what the registry checks first. The registry also checks compatibility with the versions already registered under your subject, and that comparison needs your registry, so it is not done here.

What mistakes does it catch?

Broken JSON (with comments and trailing commas called out), unknown or misspelled type names such as "integer", records without a name or fields array, invalid or duplicate field names, duplicate enum symbols, nested unions, defaults that don't match their type, union defaults that don't match the first branch, and long defaults outside the 64-bit range.

How do I create an Avro schema from JSON data?

Use the Avro Schema Generator to infer a schema from a sample of your JSON data, then paste the result here to check it before you use it.

Is this Avro schema validator free?

Yes, and there is nothing to sign up for. Your schema is checked in your browser and is not uploaded anywhere. Uploaded files can be up to 10 MB.