XSD (.xsd)
.xsd file signature | application/xml
Magic Bytes
Offset 0
3C 3F 78 6D 6C
Sources: Apache Tika
All Known Signatures
6 signature variants are documented for .xsd files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 3C 3F 78 6D 6C | 0 | Apache Tika |
| 3C 3F 58 4D 4C | 0 | Apache Tika |
| EF BB BF 3C 3F 78 6D 6C | 0 | Apache Tika |
| FF FE 3C 00 3F 00 78 00 6D 00 6C 00 | 0 | Apache Tika |
| FE FF 00 3C 00 3F 00 78 00 6D 00 6C | 0 | Apache Tika |
| 3C 21 2D 2D | 0 | Apache Tika |
Extension
.xsd
MIME Type
application/xml
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .xsd files in Python
def is_xsd(file_path: str) -> bool:
"""Check if file is a valid XSD by magic bytes."""
signature = bytes([0x3C, 0x3F, 0x78, 0x6D, 0x6C])
with open(file_path, "rb") as f:
return f.read(5) == signature
How to validate .xsd files in Node.js
function isXSD(buffer: Buffer): boolean {
const signature = Buffer.from([0x3C, 0x3F, 0x78, 0x6D, 0x6C]);
return buffer.subarray(0, 5).equals(signature);
}
How to validate .xsd files in Go
func IsXSD(data []byte) bool {
signature := []byte{0x3C, 0x3F, 0x78, 0x6D, 0x6C}
if len(data) < 5 {
return false
}
return bytes.Equal(data[:5], signature)
}
API Endpoint
/api/v1/xsd
curl https://filesignature.org/api/v1/xsd
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .xsd file?
A .xsd file is a XSD file.
What are the magic bytes for .xsd files?
The magic bytes for XSD files are 3C 3F 78 6D 6C at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .xsd file?
To validate a .xsd file, read the first bytes of the file and compare them against the known magic bytes (3C 3F 78 6D 6C) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .xsd files?
The primary MIME type for .xsd files is application/xml.
Is it safe to open .xsd files?
XSD (.xsd) 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.