.HDF

HDF File

Hierarchical Data Format File (HDF4)
Ask a question
QUICK ANSWER

An HDF file is a Hierarchical Data Format 4 (HDF4) binary container for scientific data - multi-dimensional numeric arrays, raster images, and metadata. Open it with the free HDFView tool from hdfgroup.org, or with Python (pyhdf) for programmatic access. HDF4 is superseded by HDF5 (.h5); the two formats are not compatible.

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

On this page

19k+ extensions indexed
Last reviewed Jun 25, 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 HDF file format?

.hdf files store scientific datasets in the HDF4 (Hierarchical Data Format version 4) binary container, developed in 1988 by the National Center for Supercomputing Applications (NCSA) at the University of Illinois. HDF4 was designed to let scientists and engineers store heterogeneous numerical data - multidimensional arrays, raster images, tables, and metadata - in a single portable file.

The format is identified by the four-byte magic sequence 0E 03 13 01. Internally, HDF4 uses a flat tag-and-reference architecture: every data object is described by a 12-byte descriptor (tag, reference number, offset, length) in a Data Descriptor Block. Compression is optional per dataset and may use RLE, SKPHUFF (modified Huffman), or DEFLATE (gzip). A hard 2 GB limit per data object results from 32-bit signed offset fields.

NASA distributes remote-sensing products from the Terra and Aqua satellites in HDF4-based HDF-EOS format using the .hdf extension. HDF4 has been superseded by HDF5 - a complete redesign released in 1998 - which is now recommended for new scientific work. Both formats may carry the .hdf extension; magic bytes reliably distinguish them (HDF4: 0E 03 13 01; HDF5: 89 48 44 46).

Security & safety

RISK: LOW

HDF4 is a passive binary data container with no executable code. Safe to open. Very large datasets can exhaust RAM - use pyhdf or MATLAB to read subsets. Malformed HDF4 files could trigger bugs in older versions of libhdf4; keep tools updated. Some HDF4 library versions (before 4.2.15) had CVE-rated security vulnerabilities - update to 4.2.16+.

Format details

in a nutshell
FULL NAMEHierarchical Data Format File (HDF4)aka HDF4 file, NCSA HDF file
DEVELOPERNational Center for Supercomputing Applications (NCSA); now The HDF Groupsince 1988 (HDF 1.0 by NCSA, University of Illinois)
CATEGORYData Files
MIME TYPEapplication/x-hdf
TYPEBinary scientific data container (tagged/hierarchical, HDF4 format)
STANDARDOpen · royalty-free
This extension is also used by…
  • HDF5 file (occasionally) - Some tools save HDF5 data with the .hdf extension; use magic bytes to distinguish HDF4 (0x0E031301) from HDF5 (0x89HDF...).
MAGIC BYTES · FILE SIGNATURE
OFFSET
00010203
HEX
0E031301
ASCII
····
4-byte file header: 0x0E 0x03 0x13 0x01 (big-endian on most platforms). On little-endian machines some early implementations wrote bytes in reverse order - portable parsers check both orderings.

Programs that open HDF files

Windows6 apps
FME Desktop Paid FME supports HDF4 as a source format for ETL/geospatial conversion workflows.
MATLAB Paid hdfread('file.hdf','dataset') reads SDS data; hdfinfo('file.hdf') shows structure. Native HDF4 support.
HDFView Free Free GUI from The HDF Group. File → Open; browse SDS, raster images, Vgroups, Vdata tables. Supports both HDF4 and HDF5.
IGOR Pro Paid Igor Pro supports HDF4 import for scientific waveforms; use File → Load Waves.
HDF Explorer Free Lightweight Windows viewer for HDF4 files; website is old but program may still work.
GDAL/OGR Open-source gdalinfo file.hdf lists datasets; gdal_translate -of GTiff file.hdf:dataset output.tif converts geospatial layers to GeoTIFF.
macOS2 apps
HDFView Free Available for macOS from hdfgroup.org; same functionality as Windows version.
IGOR Pro Paid Available for macOS; HDF4 import supported.
Linux4 apps
GDAL Open-source apt install gdal-bin; gdalinfo file.hdf to inspect; gdal_translate for geospatial conversion.
HDFView Free Install from hdfgroup.org or package manager (apt install hdfview). GUI browser for HDF4/HDF5.
HDF4 tools (h4dump, hdp) Open-source apt install hdf4-tools; hdp list file.hdf shows structure; hdp dumpsds dumps Scientific Dataset contents.
Python with pyhdf Open-source pip install pyhdf; from pyhdf.SD import SD; f=SD('file.hdf'); datasets=f.datasets().

Technical details

deep spec
Magic bytes0E 03 13 01 at offset 0
Format typeBinary scientific data container (flat tag/reference architecture, HDF4)
Byte orderBig-endian native; each data object stores its own byte order descriptor
CompressionOptional per dataset: RLE, SKPHUFF (modified Huffman), or DEFLATE (gzip)
Data typesMultidimensional arrays (Scientific Datasets), raster images (1-32 bpp), tables (Vdata), groups (Vgroups), annotations
Max object size~2 GB per data object (32-bit signed offset field limitation)
Max dimensionsUp to 32 dimensions per Scientific Dataset
Max object references65,535 per tag type (16-bit reference numbers)
ArchitectureFlat tag/reference - objects described by 12-byte descriptors (tag, ref, offset, length) in Data Descriptor Blocks
Primary scientific useNASA EOS remote sensing (Terra, Aqua satellites); climate and atmospheric research
Superseded byHDF5 (.h5 / .hdf5), a complete redesign released 1998; not byte-compatible with HDF4
HDF4 maintenance statusSecurity fixes only since ~2015; no new features added
Conversion toolh4h5tools (The HDF Group) converts HDF4 files to HDF5
Released1988 (HDF 1.0 by NCSA, University of Illinois)
Latest versionHDF4 4.2.16 (2022); HDF4 maintenance-only since HDF5 became primary
Open standardYes · royalty-free
Specificationsupport.hdfgroup.org

HDF conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with HDF 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 HDF files.

Frequently asked questions

How do I open an HDF file?
Use HDFView (free GUI from hdfgroup.org) to browse the contents visually. For programmatic access on Python use pyhdf; on MATLAB use hdfread/hdfinfo. For geospatial data use GDAL or QGIS.
What's the difference between HDF4 (.hdf) and HDF5 (.h5)?
HDF4 uses a flat tag-reference architecture with 32-bit addressing (2 GB per object limit); HDF5 (1998) uses a true hierarchy and 64-bit addressing. They are incompatible binary formats. HDF4 is now maintenance-only; HDF5 is the current standard.
Can I convert HDF to CSV?
Yes - extract individual Scientific Datasets to CSV using HDFView (right-click → Export as CSV) or Python pyhdf + np.savetxt(). Large multi-dimensional datasets need reshaping first.
What are MODIS .hdf files?
MODIS satellite products from NASA (Terra/Aqua) are distributed in HDF-EOS format - a subset of HDF4 with geolocation conventions. Use GDAL, QGIS, or the MODIS Reprojection Tool (MRT) to work with them.
How do I convert HDF4 to HDF5?
Use h4toh5 from the HDF Group's h4h5tools package: h4toh5 input.hdf output.h5. Available for Linux, macOS, and Windows.

References

1Library of Congress - HDF4 format descriptionwww.loc.gov
2The HDF Group - HDF4 support pagesupport.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.NOMEDIAAndroid No-Media Marker File
7.RPMSGRestricted Permission Message
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