.avro

What is a .avro file?

Apache Avro · Data · Apache Software Foundation · 2009

Avro is a compact, row-based data format that stores its schema alongside the data. That self-describing design makes it a favourite for streaming systems like Kafka, where producers and consumers must agree on structure.

Category
Data
Type
Binary
Is a .avro file safe to open? Safe. Avro is a data container read by libraries. It carries a schema and records, not executable code.

What is a .avro file used for?

An Avro object container file starts with the bytes Obj followed by 0x01, then the JSON schema, then blocks of records encoded in a tight binary form. Because the schema travels with the data, a reader always knows how to decode the records.

Avro shines for data in motion: message queues, event pipelines and Hadoop. It supports schema evolution, so fields can be added or removed over time without breaking older readers.

How to open a .avro file

The .avro format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .avro file.

Windows

  • Python (fastavro)
  • avro-tools (Java)
  • DuckDB

macOS

  • Python (fastavro)
  • avro-tools (Java)
  • DuckDB

Linux

  • Python (fastavro)
  • avro-tools (Java)
  • Apache Kafka tooling

How to convert a .avro file

You can convert a .avro file to JSON, Parquet, CSV using a conversion tool or the export menu of an app that opens it.

.avro file signature (magic bytes)

Programs recognise a .avro file by the bytes at the start of the file, not by its name. These are the signatures for Avro. For a full breakdown, see the Avro file signature page.

Hex signatureOffsetNote
4F 62 6A 010'Obj' + 0x01

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .avro file?

Avro is a compact, row-based data format that stores its schema alongside the data. That self-describing design makes it a favourite for streaming systems like Kafka, where producers and consumers must agree on structure.

How do I read an Avro file?

Use a library such as fastavro in Python or the avro-tools jar, both of which can print the embedded schema and dump the records to JSON.

What is the difference between Avro and Parquet?

Avro is row-based and self-describing, ideal for streaming and writing records one at a time. Parquet is columnar, ideal for analytical reads across many rows.

Does an Avro file contain its schema?

Yes. An Avro object container file embeds the writer's schema in its header, which is why a reader can decode it without any external definition.

Comparisons

Related formats

Sources

Details on this page were checked against authoritative references: