TFRecord Viewer

Open .tfrecord files in your browser and step through the records inside. Each tf.train.Example is decoded into a table of features with their names, types and values, with nothing uploaded.

Free, no sign-up, and fully client-side. Your file never leaves your browser. Opens .tfrecord, .tfrecords.

Open the viewer and drop a file to get started.

What is a TFRecord file?

TFRecord is TensorFlow’s format for a sequence of binary records, typically used to feed training data into a pipeline. Each record is a length-prefixed, CRC-checked chunk that usually holds a serialized tf.train.Example, a protocol-buffer map of named features (byte, float or int64 lists). It is efficient to stream but opaque without TensorFlow.

ViewKit indexes the records by walking the length prefixes, then decodes the protobuf of whichever record you select into a readable feature table, all in the browser. It is a fast way to sanity-check a dataset without a TensorFlow install, and nothing is uploaded.

What you can do with the TFRecord viewer

Record index

Walks the file’s length prefixes to list its records without reading all the data.

Feature decoding

Decodes each tf.train.Example into its named features with their type (bytes, float or int64) and values.

Byte features

Large byte features, often encoded images, are summarized rather than dumped, so the table stays readable.

No TensorFlow needed

The protobuf is parsed directly in the browser, with no TensorFlow or Python environment.

How to open a TFRecord file

  1. 1

    Drop your .tfrecord file onto the box above (or click to browse). It is read in your browser, nothing uploads.

  2. 2

    Pick a record from the list on the left.

  3. 3

    Read its features, each with a name, a type and its values, in the table.

Doing the same thing in code

Reading one record in Python:

Python
import tensorflow as tf

for raw in tf.data.TFRecordDataset("data.tfrecord").take(1):
    ex = tf.train.Example()
    ex.ParseFromString(raw.numpy())
    for name, feature in ex.features.feature.items():
        print(name, feature.WhichOneof("kind"))

This requires TensorFlow, a multi-hundred-megabyte install, to parse a length-prefixed record and a protobuf. This page decodes both directly, so you can check a shard on a machine without TensorFlow.

TFRecord viewer: frequently asked questions

Does it decode tf.train.Example?

Yes. Each record is parsed as a tf.train.Example and shown as a table of its named byte, float and int64 features.

Do I need TensorFlow installed?

No. The record framing and the protobuf are parsed directly in the browser, so a shard can be inspected on a machine without TensorFlow installed.

Why does my TFRecord file look corrupted?

Each record is length-prefixed with a CRC over both the length and the data. A shard whose writer was interrupted ends mid-record, so the index stops early and reports fewer records than expected. The record count shown is where the readable data ends.

Can I see the images stored inside?

Byte features holding encoded images are summarized rather than printed into the table, so the feature list stays readable. The table shows that the feature is present and how large it is.

Can it open large TFRecord files?

Yes. Records are indexed by their length prefixes and decoded one at a time, so the file does not have to fit in memory all at once.

Is my data uploaded?

No. The file is parsed entirely in your browser; its contents never leave your machine.

Also view in ViewKit