National Imagery Transmission Format
image/nitf
Magic Bytes
Offset: 0
4E 49 54 46 30 31 2E 31 30
The National Imagery Transmission Format (NITF) is a specialized digital file format developed and maintained by the United States Department of Defense. It serves as the primary standard for the exchange and storage of geospatial intelligence, high-resolution satellite imagery, and reconnaissance data across international military and intelligence agencies. Although the format is considered safe for imagery exchange, its complex metadata structure requires specialized software for proper interpretation and validation.
Validation Code
How to validate .ntf files in Python
Python
def is_ntf(file_path: str) -> bool:
"""Check if file is a valid NTF by magic bytes."""
signature = bytes([0x4E, 0x49, 0x54, 0x46, 0x30, 0x31, 0x2E, 0x31, 0x30])
with open(file_path, "rb") as f:
return f.read(9) == signature
How to validate .ntf files in Node.js
Node.js
function isNTF(buffer: Buffer): boolean {
const signature = Buffer.from([0x4E, 0x49, 0x54, 0x46, 0x30, 0x31, 0x2E, 0x31, 0x30]);
return buffer.subarray(0, 9).equals(signature);
}
Go
func IsNTF(data []byte) bool {
signature := []byte{0x4E, 0x49, 0x54, 0x46, 0x30, 0x31, 0x2E, 0x31, 0x30}
if len(data) < 9 {
return false
}
return bytes.Equal(data[:9], signature)
}
API Endpoint
GET
/api/v1/ntf
curl https://filesignature.org/api/v1/ntf