Avro File Viewer and Converter
Inspect Avro data from Kafka, Hadoop, Spark or BigQuery exports without installing Java tools, and create small Avro test files from JSON records.
在您的浏览器中运行。您的文件不会离开设备。 了解如何验证
…
使用方法
- 1Open the file
Drop an .avro file on the Open .avro tab.
- 2Check the header
Read the record count, blocks, codec and the schema panel.
- 3Choose the view
Turn logical types on or off and pick how nested records are shown.
- 4Search
Type in the search box to filter records on any value.
- 5Export
Download JSON, JSON Lines, CSV, Excel or the schema as .avsc.
- 6Write a file
On JSON → .avro, paste records, adjust the schema and codec, test the round trip and download.
关于此工具
Apache Avro is a compact binary format that stores data together with its schema. It is used for Kafka messages and dead-letter dumps, Hadoop and Spark data sets, BigQuery and Snowflake exports, and many event pipelines. Because it is binary, you cannot open an .avro file in a text editor, and the usual way to look inside means installing avro-tools with Java or writing a Python script. When you just need to answer a question such as what fields this export has, whether the timestamps are in milliseconds or microseconds, or why one record broke a consumer, that is a lot of setup. This viewer reads Avro object container files directly in the browser. It checks the magic bytes, reads the header metadata and the writer schema, then decodes every block with the null, deflate or snappy codec and verifies the sync marker after each block, so a truncated or corrupted file is reported instead of half-read silently. Records appear in a searchable table with the schema and metadata beside them.
Types that are decoded
All primitive types are supported: null, boolean, int and long in zig-zag variable-length encoding, float, double, bytes and string. Complex types are records, enums, arrays, maps, unions and fixed, including named types referenced later in the schema. Long values beyond the safe integer range of JavaScript are shown as exact strings instead of being rounded. With Show logical types ticked, date becomes 2026-01-01, timestamp-millis and timestamp-micros become ISO date-times, time-millis becomes a clock time, decimal values stored as bytes or fixed are shown with their scale, and duration is split into months, days and milliseconds. Untick it to see the raw stored numbers.
Browsing and exporting
Nested records can stay as JSON cells or be flattened one or all levels into columns. The search box filters rows on any value. Exports cover all records as pretty JSON, JSON Lines with one record per line, CSV and Excel of the current table view, and the schema as an .avsc file for code generators.
Writing Avro from JSON
The second tab turns a JSON array into a valid object container file. A schema is inferred from the records: integers become int or long, other numbers double, nested objects records, arrays get an item type, and fields that are missing or null somewhere become a union with null and a default of null. You can edit the schema, for example to add a logicalType, choose the deflate or null codec and the number of records per block, and run a round-trip test that reads the new file back.
Limits
The zstandard, bzip2 and xz codecs are not supported; re-export with deflate or snappy. Bare Avro messages without the container header, such as single Kafka payloads with a schema registry prefix, need the schema from elsewhere and are not read here. Up to 200,000 records are loaded, which covers most inspection jobs; very large files are limited by browser memory. Schema evolution between a reader and a writer schema is not applied.
计算示例
A data engineer receives events.avro, 84 KB, from a Kafka sink. The viewer shows 1,250 records in 2 blocks with the snappy codec and a record schema with id as long, event as an enum, user as string, ts as long with logicalType timestamp-millis and amount as a union of null and double. With logical types on, ts reads 2026-01-01T00:00:00.000Z instead of 1767225600000. Searching purchase leaves 312 rows, and the CSV export opens in a spreadsheet. On the write tab, three sample events make a 439-byte deflate file, and Test round trip reads all 3 records back.
要点
- 分类: 开发与数据
- 在浏览器中运行,无需注册,无需上传。
- 您输入的信息保留在设备上。
- 提供英文版。
- 内容最后审核日期:
- 官方来源: Apache Avro 1.12 specification (object container files, binary encoding, codecs)
常见问题
Which Avro files can it open?
Object container files, the normal .avro files that start with Obj and a version byte and hold the schema in their header, using the null, deflate or snappy codec.
Why are some numbers shown as text?
Avro long values can be larger than JavaScript can store exactly. Those values are shown as strings so no digit is lost; smaller values remain numbers.
Can I see the raw timestamp numbers?
Yes. Untick Show logical types and the file is decoded again with the stored values, such as milliseconds since 1970.
Does it apply a different reader schema?
No. Records are decoded with the writer schema stored in the file. Schema resolution with a separate reader schema is not part of this tool.
How is the schema chosen when writing?
It is inferred from your JSON records and shown for editing. Keep it, change field types or add logical types, then download; invalid records are reported with their path.
Is my file uploaded?
No. Files are decoded and written by your browser, and only the write tab's JSON and schema text is kept in local storage.
