NITF (.nitf)
.nitf file signature | image/nitf
Magic Bytes
Offset 0
4E 49 54 46 30 31 2E 31 30
Sources: Apache Tika
All Known Signatures
3 signature variants are documented for .nitf files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 4E 49 54 46 30 31 2E 31 30 | 0 | Apache Tika |
| 4E 49 54 46 30 32 2E 30 30 30 | 0 | Apache Tika |
| 4E 49 54 46 30 32 2E 31 30 30 | 0 | Apache Tika |
Extension
.nitf
MIME Type
image/nitf
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .nitf files in Python
def is_nitf(file_path: str) -> bool:
"""Check if file is a valid NITF 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 .nitf files in Node.js
function isNITF(buffer: Buffer): boolean {
const signature = Buffer.from([0x4E, 0x49, 0x54, 0x46, 0x30, 0x31, 0x2E, 0x31, 0x30]);
return buffer.subarray(0, 9).equals(signature);
}
How to validate .nitf files in Go
func IsNITF(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
/api/v1/nitf
curl https://filesignature.org/api/v1/nitf
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .nitf file?
A .nitf file is a NITF file.
What are the magic bytes for .nitf files?
The magic bytes for NITF files are 4E 49 54 46 30 31 2E 31 30 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .nitf file?
To validate a .nitf file, read the first bytes of the file and compare them against the known magic bytes (4E 49 54 46 30 31 2E 31 30) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .nitf files?
The primary MIME type for .nitf files is image/nitf.
Is it safe to open .nitf files?
NITF (.nitf) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.