HDF

application/x-hdf

Safe

Magic Bytes

Offset: 0
0E 03 13 01

Hierarchical Data Format (HDF) is a data model, library, and file format originally developed by the National Center for Supercomputing Applications (NCSA) and now maintained by The HDF Group. It is extensively used in scientific computing to manage complex, multi-object datasets, particularly in fields like earth science, climatology, and aerospace engineering. While this specific signature typically denotes the older HDF4 standard, the format remains critical for accessing legacy scientific archives and meteorological data repositories.

Extension

.hdf

MIME Type

application/x-hdf

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .hdf files in Python

Python
def is_hdf(file_path: str) -> bool:
    """Check if file is a valid HDF by magic bytes."""
    signature = bytes([0x0E, 0x03, 0x13, 0x01])
    with open(file_path, "rb") as f:
        return f.read(4) == signature

How to validate .hdf files in Node.js

Node.js
function isHDF(buffer: Buffer): boolean {
  const signature = Buffer.from([0x0E, 0x03, 0x13, 0x01]);
  return buffer.subarray(0, 4).equals(signature);
}
Go
func IsHDF(data []byte) bool {
    signature := []byte{0x0E, 0x03, 0x13, 0x01}
    if len(data) < 4 {
        return false
    }
    return bytes.Equal(data[:4], signature)
}

API Endpoint

GET /api/v1/hdf
curl https://filesignature.org/api/v1/hdf

Related Formats