b2KIT

Avro File Viewer

View Apache Avro container files with embedded schema display and record browsing.

Tested tool guide Tested browser tools Checked August 16, 2026

What Avro File Viewer does, with a checked example

Avro is a binary serialization format with no plain-text form: records are encoded as typed values, and the schema describing them is embedded in the container file's header, not kept in a separate .avsc file. This tool parses that header, displays the writer schema, and decodes the file's records so you can inspect an .avro file without installing avro-tools or a JVM. All parsing happens locally in your browser; the file is never uploaded. The surprise most users hit: an .avro file is not readable as text, and the record structure you see is determined by whatever schema the producer embedded.

Worked example

A concrete input and expected output from the current implementation.

Input

An Avro container file whose embedded writer schema is {"type":"record","name":"Reading","fields":[{"name":"sensor","type":"string"},{"name":"value","type":"double"},{"name":"ts","type":"long"}]} and which contains two records: {"sensor":"a1","value":21.5,"ts":1720000000000} and {"sensor":"b2","value":19.75,"ts":1720000000100}.

Expected output

A schema panel showing the schema JSON, and a record list: Record 1: {"sensor":"a1","value":21.5,"ts":1720000000000} / Record 2: {"sensor":"b2","value":19.75,"ts":1720000000100}

The container header stores the schema, and each record is binary-encoded in the field order the schema declares, so the viewer decodes both records with that same schema and shows each field with the type the schema assigns: strings as text, doubles as decimals, longs as integers.

How the result is produced

1

Container layout

An Avro container file begins with the four-byte magic Obj\x01, followed by a metadata map that holds the writer schema under the key avro.schema, then a 16-byte sync marker. Data follows as a sequence of blocks: each block carries the number of objects it contains, the byte length of its encoded payload, and ends with a sync marker. The viewer reads this structure to locate records and validate the framing.

2

Schema-driven decoding

Each record is a stream of binary values whose meaning comes only from the schema: int and long fields use variable-length zig-zag encoding, strings are length-prefixed UTF-8, and union fields begin with an index byte naming the branch present. The viewer applies the embedded schema field by field, so doubles display as numbers, bytes fields become readable, and the exact union branch is resolved. If the file declares a codec such as deflate or snappy, blocks are decompressed before decoding.

Good uses

  • You pulled an .avro file out of a Kafka topic, a data pipeline, or an HDFS export and want to see what fields the records actually contain without setting up a JVM-based toolchain.
  • You are debugging a producer: open its output to confirm the embedded schema and check specific records for unexpected nulls, missing fields, or values of the wrong type.
  • You received an .avro export from a colleague or a batch job and need a quick look at the data and its schema before writing code or converting it to CSV or JSON.

Limits and checks

  • Binary, not text: an .avro file contains no readable record text, so pasting file contents into the tool cannot work; you must select the file itself. Any JSON-looking text you find inside the raw bytes is the schema, not the records.
  • Only the writer schema is embedded: the container carries the schema the producer wrote with, not the reader schema your code might expect. Records may therefore include fields you did not anticipate, or omit ones you did.
  • Values keep their Avro types, and logical types stay raw: a long declared with logical type timestamp-millis is displayed as a millisecond count rather than a date unless the viewer explicitly decodes logical types, and a union shows whichever branch each record actually uses.

Common questions

My file won't open and I'm sure it's Avro. What could be wrong?

Check the magic bytes first: a valid container starts with the four bytes 'Obj' followed by 0x01, visible in a hex editor. Also check whether the file declares a codec the viewer does not implement, and whether it is a container at all: raw Avro-encoded records without a container header cannot be opened, because they carry no schema.

Does viewing the file send it anywhere?

No. The viewer parses the container entirely in your browser; nothing is uploaded to a server, so you do not need to worry about sharing sensitive records with a third party, and the tool works with no network access after the page loads.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools