CDX (.cdx)
.cdx file signature | chemical/x-cdx
FreeArcfile
Magic Bytes
Offset 0
56 6A 43 44 30 31 30 30
Sources: Apache Tika
All Known Signatures
2 signature variants are documented for .cdx files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 56 6A 43 44 30 31 30 30 | 0 | Apache Tika |
| 41 72 43 | 0 | Wikipedia |
Extension
.cdx
MIME Type
chemical/x-cdx
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .cdx files in Python
def is_cdx(file_path: str) -> bool:
"""Check if file is a valid CDX by magic bytes."""
signature = bytes([0x56, 0x6A, 0x43, 0x44, 0x30, 0x31, 0x30, 0x30])
with open(file_path, "rb") as f:
return f.read(8) == signature
How to validate .cdx files in Node.js
function isCDX(buffer: Buffer): boolean {
const signature = Buffer.from([0x56, 0x6A, 0x43, 0x44, 0x30, 0x31, 0x30, 0x30]);
return buffer.subarray(0, 8).equals(signature);
}
How to validate .cdx files in Go
func IsCDX(data []byte) bool {
signature := []byte{0x56, 0x6A, 0x43, 0x44, 0x30, 0x31, 0x30, 0x30}
if len(data) < 8 {
return false
}
return bytes.Equal(data[:8], signature)
}
API Endpoint
/api/v1/cdx
curl https://filesignature.org/api/v1/cdx
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .cdx file?
A .cdx file is a CDX file. FreeArcfile
What are the magic bytes for .cdx files?
The magic bytes for CDX files are 56 6A 43 44 30 31 30 30 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .cdx file?
To validate a .cdx file, read the first bytes of the file and compare them against the known magic bytes (56 6A 43 44 30 31 30 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 .cdx files?
The primary MIME type for .cdx files is chemical/x-cdx.
Is it safe to open .cdx files?
CDX (.cdx) 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.