.H5

H5 File

Hierarchical Data Format Version 5
Ask a question
QUICK ANSWER

An H5 file is an HDF5 (Hierarchical Data Format 5) binary data container for large scientific arrays, tables, and metadata. Open it with HDFView (free GUI), Python h5py, or MATLAB. Standard office software cannot read it.

Developer: The HDF Group (originally National Center for Supercomputing Applications, NCSA) Category: Data Files Open standard MIME: application/x-hdf5
OPENS ON Windows macOS Linux
Related: .PKPASS · .DAT · .JSON · .RIS

On this page

19k+ extensions indexed
Last reviewed Jun 18, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the H5 file format?

The .h5 file extension denotes an HDF5 (Hierarchical Data Format version 5) file, a binary scientific data container developed by the HDF Group and originally created at the National Center for Supercomputing Applications (NCSA) in 1998. HDF5 is a self-describing, hierarchical format designed to store enormous multi-dimensional datasets alongside rich metadata.

Internally, an .h5 file is organised as a tree of named groups (analogous to directories) and datasets (N-dimensional typed arrays). Every dataset records its own data type, dimensions, byte order, and compression settings. Datasets can optionally be compressed on a per-chunk basis using GZIP, SZIP, Blosc, or Zstandard, enabling efficient storage even for terabyte-scale data. Each file and object can carry named attributes for additional metadata.

Common uses include:

  • large scientific datasets in geoscience, physics, bioinformatics, and aerospace (NASA, NOAA, ESA, and CERN all rely on HDF5),
  • storing Keras and TensorFlow neural network weights and model architectures,
  • providing the underlying storage layer for NetCDF-4 files.

All HDF5 files begin with the magic signature \x89HDF\r\n\x1a\n (8 bytes, typically at offset 0). The format supports both little-endian and big-endian byte ordering, declared per file in the superblock. HDF5 files are read with Python’s h5py library, MATLAB, the h5dump command-line utility from the official HDF5 toolset, and the HDFView GUI.

The .h5 and .hdf5 extensions are interchangeable - both identify valid HDF5 files and are treated identically by all HDF5-aware software.

Security & safety

RISK: LOW

HDF5 is a passive binary data container with no executable code. Safe to open. Very large datasets can cause memory issues if loaded entirely into RAM - use h5py's lazy-loading (f['/dataset'][::]) to slice large arrays. Malformed HDF5 files could trigger library bugs in older versions of libhdf5; keep the library updated.

Format details

in a nutshell
FULL NAMEHierarchical Data Format Version 5aka HDF5 file, HDF5 dataset
DEVELOPERThe HDF Group (originally National Center for Supercomputing Applications, NCSA)since 1998 (HDF5 1.0 release by NCSA)
CATEGORYData Files
MIME TYPEapplication/x-hdf5
TYPEBinary scientific data container (hierarchical, self-describing)
STANDARDOpen · royalty-free
This extension is also used by…
  • Keras/TensorFlow neural network model - Keras saves trained model weights and architecture to .h5 using HDF5; this is the same format, not a different one.
  • NetCDF-4 climate/oceanography data - NetCDF-4 files (.nc, .nc4) are HDF5 files with additional NetCDF conventions; sometimes mistakenly saved as .h5.
MAGIC BYTES · FILE SIGNATURE
OFFSET
0001020304050607
HEX
894844460D0A1A0A
ASCII
·HDF····
The superblock (containing the magic signature) may appear at offset 0, 512, 1024, 2048, or successive doubling offsets within the file. This allows wrapping HDF5 in another file format or adding a user header. However, the vast majority of HDF5 files have the signature at offset 0. A 4-byte version field follows the 8-byte signature in the superblock (version 0, 1, 2, or 3).

Programs that open H5 files

Windows5 apps
MATLAB Paid h5read('file.h5','/dataset') reads data; h5disp('file.h5') shows structure. Native HDF5 support since R2006b.
HDFView Free Free GUI browser from The HDF Group. File → Open, browse the group/dataset tree, view array contents and attributes.
Python with h5py Open-source pip install h5py; import h5py; f=h5py.File('file.h5','r'); f.keys() to list datasets.
Python with PyTables Open-source pip install tables; import tables; f=tables.open_file('file.h5'); f.root - Pythonic interface for large tabular HDF5 data.
Keras / TensorFlow (for ML models) Open-source model = keras.models.load_model('model.h5') - loads architecture and weights from a Keras HDF5 file.
macOS2 apps
MATLAB Paid h5read/h5disp functions - same as Windows.
HDFView Free Available for macOS on the HDF Group website; same GUI as Windows version.
Linux2 apps
HDFView Free Available as Linux binary; often in package managers (apt install hdfview, dnf install hdfview).
h5dump (HDF5 tools) Open-source h5dump -n file.h5 lists structure; h5dump -d /dataset file.h5 dumps data. Installed via libhdf5-dev/hdf5-tools.

Technical details

deep spec
Container formatHDF5 hierarchical group/dataset/attribute container
Magic bytes89 48 44 46 0D 0A 1A 0A; ASCII \x89HDF\r\n\x1a\n; 8 bytes at offset 0 (may appear at 512/1024/2048 offsets)
Byte orderLittle-endian or big-endian, declared per file in the superblock
EncodingBinary
MIME typeapplication/x-hdf5
CompressionOptional per-dataset filter pipeline: GZIP, SZIP, LZF, Blosc, Zstandard, or none
ChecksumFletcher32 per chunk (optional, per-dataset); superblock checksum in v2/v3
Superblock versions0-3; v2/v3 add compact layout and file-space management
Max dataset dimensions32 dimensions; up to 2^64 elements per dimension
ChunkingDatasets can be split into fixed-size chunks enabling per-chunk compression, random access, and dynamic extension
Typical file size100 KB - 100 GB+ (Keras/TensorFlow model weights typically 1-500 MB)
Self-describingEach dataset stores its own type, dimensions, byte order, compression, and named attributes
Backward compatibilityNewer HDF5 library versions read all older HDF5 files
PlatformLinux, Windows, macOS, HPC clusters (any POSIX OS)
Released1998 (HDF5 1.0 release by NCSA)
Latest versionHDF5 1.14 (2023); file format spec version 1.1 (adds new B-tree type)
Open standardYes · royalty-free
Specificationsupport.hdfgroup.org

H5 conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with H5 files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about H5 files.

Frequently asked questions

How do I open an H5 file?
Use HDFView (free GUI from The HDF Group) to inspect the contents visually, or Python with h5py (import h5py; f=h5py.File('file.h5','r')). MATLAB also reads .h5 natively with h5read().
What is an H5 file in machine learning?
It's a Keras/TensorFlow neural network model saved in HDF5 format. Load it with: from tensorflow import keras; model = keras.models.load_model('model.h5'). The file contains layer weights and architecture.
Can I open an H5 file in Excel?
Not directly. Export a dataset to CSV first (with HDFView or h5py), then open the CSV in Excel.
What's the difference between .h5 and .hdf5?
Nothing - they are the same format; .hdf5 is the longer, more explicit extension. Libraries treat them identically.
How do I view what's inside an H5 file without programming?
Use HDFView (free, from hdfgroup.org) - a GUI that shows the group/dataset tree and lets you view array contents, attributes, and metadata without writing any code.

References

1LOC Digital Formats - HDF5www.loc.gov
2The HDF Group - HDF5 official sitewww.hdfgroup.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.MDMarkdown Document
3.CRDOWNLOADChrome Partial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.PARTPartial Download File
6.RPMSGRestricted Permission Message
7.NOMEDIAAndroid No-Media Marker File
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.ICSiCalendar data file

Related extensions

.PKPASSApple Wallet Pass (formerly Passbook)
.DATProgram Data File (generic)
.JSONJavaScript Object Notation file
.RISResearch Information Systems citation file
.OFXOpen Financial Exchange
.CSVComma-Separated Values

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z