SD2 (.sd2)
.sd2 file signature | application/x-sas-data-v6
Magic Bytes
Offset 0
53 41 53 20 20 20 20 20 36 2E
Sources: Apache Tika
All Known Signatures
4 signature variants are documented for .sd2 files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 53 41 53 20 20 20 20 20 36 2E | 0 | Apache Tika |
| 53 41 53 20 20 20 20 20 37 2E | 0 | Apache Tika |
| 53 41 53 20 20 20 20 20 38 2E 30 | 0 | Apache Tika |
| 53 41 53 20 20 20 20 20 39 2E 30 | 0 | Apache Tika |
Extension
.sd2
MIME Type
application/x-sas-data-v6
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .sd2 files in Python
def is_sd2(file_path: str) -> bool:
"""Check if file is a valid SD2 by magic bytes."""
signature = bytes([0x53, 0x41, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36, 0x2E])
with open(file_path, "rb") as f:
return f.read(10) == signature
How to validate .sd2 files in Node.js
function isSD2(buffer: Buffer): boolean {
const signature = Buffer.from([0x53, 0x41, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36, 0x2E]);
return buffer.subarray(0, 10).equals(signature);
}
How to validate .sd2 files in Go
func IsSD2(data []byte) bool {
signature := []byte{0x53, 0x41, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36, 0x2E}
if len(data) < 10 {
return false
}
return bytes.Equal(data[:10], signature)
}
API Endpoint
/api/v1/sd2
curl https://filesignature.org/api/v1/sd2
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .sd2 file?
A .sd2 file is a SD2 file.
What are the magic bytes for .sd2 files?
The magic bytes for SD2 files are 53 41 53 20 20 20 20 20 36 2E at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .sd2 file?
To validate a .sd2 file, read the first bytes of the file and compare them against the known magic bytes (53 41 53 20 20 20 20 20 36 2E) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .sd2 files?
The primary MIME type for .sd2 files is application/x-sas-data-v6.
Is it safe to open .sd2 files?
SD2 (.sd2) 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.