.hdf5

What is a .hdf5 file?

Hierarchical Data Format v5 · Data · The HDF Group · 1998

HDF5 stores large, complex scientific datasets in a single file organised like a filesystem, with groups (folders) and datasets (arrays). It handles gigabytes of numerical data efficiently and is a staple of research computing.

Category
Data
Type
Binary
Also seen as
.h5
Is a .hdf5 file safe to open? Safe. HDF5 is a scientific data container read by libraries. It stores arrays and metadata, not executable code.

What is a .hdf5 file used for?

An HDF5 file begins with an eight-byte signature that, like PNG, mixes a high-bit byte, the ASCII HDF and CRLF, DOS-EOF and LF bytes to catch corruption. Inside, data is arranged hierarchically with rich metadata attached to each dataset.

It is used in physics, climate science, machine learning and engineering wherever big multidimensional arrays must be stored and read partially. Tools read it through the HDF5 library or wrappers like h5py.

How to open a .hdf5 file

The .hdf5 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 .hdf5 file.

Windows

  • HDFView
  • Python (h5py)
  • Panoply

macOS

  • HDFView
  • Python (h5py)
  • Panoply

Linux

  • HDFView
  • Python (h5py)
  • h5dump

How to convert a .hdf5 file

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

.hdf5 file signature (magic bytes)

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

Hex signatureOffsetNote
89 48 44 46 0D 0A 1A 0A0same guard pattern style as PNG

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .hdf5 file?

HDF5 stores large, complex scientific datasets in a single file organised like a filesystem, with groups (folders) and datasets (arrays). It handles gigabytes of numerical data efficiently and is a staple of research computing.

How do I open an HDF5 file?

Use HDFView for a visual tree, or read it in Python with h5py. The command-line h5dump prints its structure and contents.

What does the .h5 extension mean?

.h5 and .hdf5 are the same format; .h5 is just the shorter, common extension for Hierarchical Data Format version 5 files.

Why is HDF5 used for big data?

It stores huge multidimensional arrays with metadata in one file and lets programs read just the slices they need without loading everything.

Related formats

Sources

Details on this page were checked against authoritative references: