Microsoft Windows Media Audio/Video File (.asf)
.asf file signature | video/x-ms-asf
Microsoft Windows Media Audio/Video File, based on the Advanced Systems Format, is a multimedia container format developed by Microsoft for the Windows Media family. It is used to store audio, video, and synchronized metadata for streaming, playback, and archival distribution in Windows Media Player and compatible software. As a legacy format, it is less common today, and files from untrusted sources should still be handled with standard caution.
Magic Bytes
Offset 0
30 26 B2 75
Sources: Apache Tika
All Known Signatures
4 signature variants are documented for .asf files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 30 26 B2 75 | 0 | Apache Tika |
| 30 26 B2 75 8E 66 CF 11 | 0 | Wikipedia |
| A6 D9 00 AA 00 62 CE 6C | 0 | Wikipedia |
| 30 26 B2 75 8E 66 CF 11 A6 D9 00 AA 00 62 CE 6C | 0 | Gary Kessler |
Extension
.asf
MIME Type
video/x-ms-asf
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .asf files in Python
def is_asf(file_path: str) -> bool:
"""Check if file is a valid ASF by magic bytes."""
signature = bytes([0x30, 0x26, 0xB2, 0x75])
with open(file_path, "rb") as f:
return f.read(4) == signature
How to validate .asf files in Node.js
function isASF(buffer: Buffer): boolean {
const signature = Buffer.from([0x30, 0x26, 0xB2, 0x75]);
return buffer.subarray(0, 4).equals(signature);
}
How to validate .asf files in Go
func IsASF(data []byte) bool {
signature := []byte{0x30, 0x26, 0xB2, 0x75}
if len(data) < 4 {
return false
}
return bytes.Equal(data[:4], signature)
}
API Endpoint
/api/v1/asf
curl https://filesignature.org/api/v1/asf
See the full API documentation for all endpoints and parameters.
Related Formats
Frequently Asked Questions
What is a .asf file?
A .asf file is a Microsoft Windows Media Audio/Video File file. Microsoft Windows Media Audio/Video File, based on the Advanced Systems Format, is a multimedia container format developed by Microsoft for the Windows Media family. It is used to store audio, video, and synchronized metadata for streaming, playback, and archival distribution in Windows Media Player and compatible software. As a legacy format, it is less common today, and files from untrusted sources should still be handled with standard caution.
What are the magic bytes for .asf files?
The magic bytes for Microsoft Windows Media Audio/Video File files are 30 26 B2 75 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .asf file?
To validate a .asf file, read the first bytes of the file and compare them against the known magic bytes (30 26 B2 75) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .asf files?
The primary MIME type for .asf files is video/x-ms-asf.
Is it safe to open .asf files?
Microsoft Windows Media Audio/Video File (.asf) 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.