Skip to main content

Avro Schema Generator

Paste a JSON object or array and generate an Apache Avro schema instantly. Detects nested records, arrays, nullable fields, and logical types like timestamp-millis and date. Useful for Kafka + Confluent Schema Registry workflows. Runs entirely in your browser.

✓ Nested record support ✓ Logical type detection ✓ Nullable field unions

Frequently Asked Questions

What is Apache Avro and why use it?▼

Apache Avro is a data serialization system used heavily in the Hadoop/Kafka ecosystem. It stores schema with data (or in a schema registry), provides compact binary serialization, and supports schema evolution with backward/forward compatibility. It's the standard format for Kafka messages via the Confluent Schema Registry and for Hadoop/Spark data pipelines.

How does the JSON-to-Avro type mapping work?▼

JSON booleans → Avro boolean. JSON integers → Avro long. JSON floats/decimals → Avro double. JSON strings → Avro string (with datetime/date detection). ISO 8601 datetime strings → Avro timestamp-millis (logical type). Date-only strings (YYYY-MM-DD) → Avro date (logical type). JSON arrays → Avro array with inferred item type. JSON objects → nested Avro record. JSON null values → union ['null', 'string'] with null default.

What are Avro logical types?▼

Logical types annotate a base Avro type with semantic meaning. Common ones: date (stored as int, days since epoch), time-millis (stored as int, ms since midnight), timestamp-millis (stored as long, ms since Unix epoch), decimal (stored as bytes, with precision/scale), uuid (stored as string). The generator detects ISO 8601 datetime and date strings and emits the appropriate logical type.

How does Avro handle nullable fields?▼

In Avro, nullable fields are represented as a union: ['null', 'actualType']. When the JSON sample contains null, the generator outputs this union type with a null default. In practice, you can use the Avro union pattern to make any field optional by adding 'null' to its type array.

How does Avro schema evolution work?▼

Avro supports schema evolution with backward/forward compatibility. You can add fields with defaults (backward compatible), add union types, or rename fields with aliases. The key rule: never delete fields without providing a default, and never change field types without using a union. This is why using a Schema Registry (like Confluent) is recommended to track schema versions.

Does this tool send my JSON data to a server?▼

No. All schema generation runs entirely in your browser using JavaScript. Your JSON data — which may contain sensitive field names or data structures — never leaves your machine.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

JSON Diff Viewer Fake Data Generator JSON Diff JSON Formatter Pro JSON Path Finder YAML to JSON Converter CSV to JSON Converter JSON to CSV Converter JSON ↔ YAML Converter JSON-LD Schema Generator JSON Schema Form Builder Prisma Schema Visualizer Kafka Topic Config Generator Protobuf to JSON Converter CSV JSON Transformer JSON Schema to Zod Converter Mock Data Generator NFT Metadata Generator Database Schema Diff JSON Formatter & Validator JSON Schema Generator Grafana Dashboard JSON Validator Zod Schema Generator TOML to JSON Converter Prisma Schema Builder LLM JSON Schema Builder JSON to TypeScript Interface package.json Validator & Audit TOML to JSON Converter SQL ERD Diagram Generator package.json Generator Database Schema Visualizer OpenAPI Mock Generator Drizzle Schema Generator EVM Calldata Decoder OpenAI Function Calling Generator Neon DB Query Builder PlanetScale Branch Manager Turso Edge DB Explorer SQL Index Advisor YAML Validator Pro SQL to TypeScript Types MCP Endpoint Tester Grafana Dashboard JSON Builder API Response Formatter & Analyzer Base64 Encoder & Decoder Base64 Encode / Decode Image to Base64 Converter Interview Question Generator JWT Builder JWT Decoder SVG Editor & Optimizer TOML Validator UUID v7 Generator YAML Validator & Formatter PWA Manifest Generator Biome Config Generator Package Lock Analyzer Feature Flag Config Generator GraphQL Query Builder GCP Service Account Key Checker Azure ARM Template Validator Haproxy Config Validator SBOM Generator JWT Debugger Pro OpenAPI Schema Validator GraphQL Fragment Generator TypeScript tsconfig.json Generator Chrome Extension Manifest Generator Database Index Analyzer GraphQL Schema Validator v2 API Mock Server Config Generator npm Package Stats Database Index Advisor AI Agent Memory Planner RAG Chunking Calculator IPFS CID Version Converter MCP Server Config Builder LangGraph Workflow Visualizer AWS IAM Policy Generator GCP Service Account Key Auditor RAG Chunking Calculator Expo App Config Generator TypeScript Discriminated Union Builder Embedding Storage Calculator RAG Chunk Size Optimizer LLM Prompt Template Builder PostgreSQL Connection String Builder

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →