.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.

What opens 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.

Windows

  • HDFView
  • Python (h5py)
  • Panoply

macOS

  • HDFView
  • Python (h5py)
  • Panoply

Linux

  • HDFView
  • Python (h5py)
  • h5dump

Open a .hdf5 file step by step

  1. Confirm the file really is a .hdf5. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
  2. On Windows, open it with HDFView or Python (h5py).
  3. On Mac, use HDFView or Python (h5py).
  4. On Linux, try HDFView or Python (h5py).
  5. Still stuck? Convert the .hdf5 to CSV, which opens more widely.

Why can't I open my .hdf5 file?

Almost always because no installed app understands HDF5. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.

The other possibility is that the file is not really a .hdf5 at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.

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.

What is the .hdf5 file signature (magic bytes)?

A .hdf5 file starts with the hex bytes 89 48 44 46 0D 0A 1A 0A, which read as .HDF.... in ASCII. Programs identify HDF5 by those bytes, not by the filename, so a renamed file still gives itself away.

These are the documented signatures for HDF5. For a full breakdown, see the HDF5 file signature page.

Documented magic-byte signatures for the .hdf5 format
Hex signatureOffsetASCIINote
89 48 44 46 0D 0A 1A 0A0.HDF....same 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. How sources are ranked and what is deliberately left out is set out in the methodology.