HDF5 (.h5, .hdf5, and sometimes .he5) is a binary container used for scientific arrays, satellite products, simulations, microscopy, and machine-learning datasets. Unlike a spreadsheet, an HDF5 file is hierarchical: groups contain datasets, and every dataset can have its own shape, data type, dimensions, and attributes.
A text editor cannot show that structure. These are the four practical ways to open it.
Method 1: Open HDF5 in your browser
For a quick inspection, use the GribBox HDF5 viewer:
- Open /hdf5/viewer.
- Drop an
.h5,.hdf5,.he5,.nc4, or HDF5-backed.ncfile. - Expand the group tree and select a numeric dataset.
- If the dataset has more than two dimensions, choose indices for the leading dimensions.
- Preview the slice or export it with HDF5 to CSV or HDF5 to JSON.
The browser loads libhdf5 as WebAssembly only after you choose a file. Parsing and export happen in a dedicated worker, and the file is never uploaded. This is useful for unpublished research, confidential instrument output, and locked-down computers where installing Python is not an option.
Method 2: HDFView
HDFView is the official desktop GUI from The HDF Group. It provides a mature hierarchy browser and table views for datasets.
Use HDFView when you need a desktop application or want to edit supported metadata. The tradeoff is setup: you must download and maintain a native application, and institutional computers may block installation.
Method 3: Python with h5py
Python is the standard option for repeatable analysis:
import h5py
with h5py.File("sample.h5", "r") as file:
file.visit(print)
data = file["/science/model/temperature"][0, :, :]
print(data.shape)h5py gives precise control over groups, attributes, chunked datasets, compression, and slicing. It is the right choice for an automated pipeline. It also requires a working Python environment and native HDF5 dependencies, which is more setup than a one-off inspection needs.
Method 4: Command-line tools
The HDF5 utilities include h5ls for structure and h5dump for metadata or values:
h5ls -r sample.h5
h5dump -H sample.h5
h5dump -d /science/model/temperature sample.h5These commands are excellent on servers and in shell scripts, but the output becomes unwieldy for large arrays and the HDF5 tools must be installed first.
Which option should you choose?
| Need | Best option |
|---|---|
| Inspect a file now, without installing anything | Browser HDF5 viewer |
| Export one dataset slice to a spreadsheet | HDF5 to CSV |
| Build a repeatable analysis pipeline | Python with h5py |
| Browse or edit with a desktop GUI | HDFView |
| Inspect files on a remote server | h5ls / h5dump |
Frequently asked questions
Is NetCDF-4 an HDF5 file?
NetCDF-4 uses HDF5 as its storage container and adds NetCDF conventions on top. HDF5-backed .nc and .nc4 files can therefore be opened by an HDF5 parser. See HDF5 vs NetCDF for the practical differences.
Can a browser open compressed HDF5 datasets?
Yes. GribBox uses libhdf5 compiled to WebAssembly, so standard HDF5 features such as nested groups, chunked datasets, and common compression filters are handled by the same core library used by native tools.
Does opening a large HDF5 file upload it?
No. GribBox reads the file locally. You choose a dataset and slice before export, which avoids turning an entire multi-dimensional container into one oversized CSV or JSON payload.

