TypeScript to Apache Avro Schema Converter
Convert TypeScript interfaces and type definitions into Apache Avro (.avsc) record schemas in your browser.
At a glance
TypeScript to Avro Converter translates TypeScript interfaces and type aliases into Apache Avro record schemas. It maps object properties to Avro fields, translates optional properties to null unions with default null, handles string, int, double, and boolean primitives, converts arrays and enums, and exports valid .avsc files client-side.
100% Client-Side In-Browser TypeScript to Apache Avro (.avsc) Schema Converter
Compile TypeScript interfaces and types into Apache Avro record schemas, null union types, default values, enums, and timestamp logicalTypes locally in browser memory. Zero network latency or server uploads.
Optional Null Unions
In Apache Avro, optional fields are defined as null unions ["null", "type"] with a default value of null. The generator automatically maps optional TypeScript properties to compliant unions.
Timestamp Logical Types
TypeScript Date objects automatically serialize as 64-bit integer values paired with Avro's standard timestamp-millis logicalType for seamless Kafka and data warehouse integration.
Kafka & Registry Ready
The generated JSON schemas are 100% compatible with Confluent Schema Registry, AWS Glue, Apache Flink, and Kafka serializers out of the box with zero modifications.
Why Use This TypeScript to Apache Avro Schema Converter?
How to Use TypeScript to Apache Avro Schema Converter
Paste TypeScript Definitions
Enter or paste your TypeScript interfaces, type aliases, or enums into the input editor.
Configure Avro Options
Specify an optional namespace, choose default integer types (int vs long), and select JSON formatting style.
Copy or Download .avsc File
Copy the generated Apache Avro schema directly or download it as an .avsc file ready for Schema Registry.
TypeScript Interface to Apache Avro Record Schema
Demonstrates converting a TypeScript interface with scalar primitives and optional properties into a standard Apache Avro record schema.
interface CustomerRecord {
id: string;
name: string;
active: boolean;
balance: number;
bio?: string;
}
{
"type": "record",
"name": "CustomerRecord",
"fields": [
{ "name": "id", "type": "string" },
{ "name": "name", "type": "string" },
{ "name": "active", "type": "boolean" },
{ "name": "balance", "type": "int" },
{ "name": "bio", "type": ["null", "string"], "default": null }
]
}
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported Formats | TEXT → TEXT |
| Execution Mode | 100% Client-Side In-Browser (client) |
| Browser Requirements | Modern browser with JavaScript enabled. |
| Performance Constraints | Zero external dependencies. Runs 100% client-side in browser memory. |
100% Client-Side Privacy Guarantee
Your files and data remain strictly on your local device. Computations run locally using browser memory with zero network uploads.
Frequently Asked Questions
How does the converter handle optional TypeScript properties?
Are nested TypeScript interfaces supported?
How are TypeScript Date properties mapped?
Is my source code secure and private?
Methodology
This tool runs entirely in your browser. The example above shows a representative input and the result it produces.
Last updated .