Avro to JSON Converter
Generate sample JSON from an Avro schema (.avsc). Runs locally in your browser.
Avro Schema
JSON Output
{"orderId": "orderId-1","customer": {"name": "name-1","email": "[email protected]"},"items": [{"sku": "sku-1","quantity": 1,"unitPriceCents": 1}],"status": "PAID"}
The Kafka IDE
Mock and produce Avro messages in Kafma
Kafma is a desktop app for Kafka. Generate sample JSON from your Schema Registry with registered references resolved, then edit, validate, and produce Avro messages to a topic.
macOS Windows Linux
Avro to JSON FAQ
- Why is a union wrapped like {"string": "note-1"} in Avro JSON?
- Avro JSON encoding wraps non-null union values in the branch type name. null stays JSON null. See the Avro JSON encoding
- Why is timestamp-millis a large number in Avro JSON?
- timestamp-millis is encoded as milliseconds since the Unix epoch, using a JSON number. It is not an RFC 3339 string. See the Avro JSON encoding
- Can Avro long values lose precision in JSON?
- Avro long values are JSON numbers. JavaScript cannot represent every integer outside its safe range exactly. Use a parser that preserves large integers; quoting a value changes its JSON type and does not match an Avro long schema.
- Why is a referenced Avro type unknown?
- This tool does not fetch other files or Schema Registry subjects. Include the referenced named type definitions in the pasted JSON Avro schema (.avsc).
- Why does generation fail for deeply nested schemas?
- This tool limits nesting to 4 levels. A nullable union can fall back to null, but a required record beyond the limit causes generation to fail. Try a smaller schema to preview the structure.
- Can I send this JSON directly as an Avro Kafka message?
- The JSON uses Avro JSON encoding. Producing a binary Avro message requires the matching schema and a serializer. In Kafma, select the schema in Kafka Console, generate or edit a payload, then produce it.
- Can I decode binary Avro to JSON?
- No. This page generates sample JSON from an Avro schema. It does not decode binary Avro payloads. To read live Kafka messages, use Kafka Console.
- Is my input uploaded?
- No. Conversion runs in your browser. Your input and generated output are not uploaded.
- Can I generate an Avro schema from sample JSON?
- Use the JSON to Avro converter to infer an Avro schema from sample JSON.