WL (.wl)
.wl file signature | application/vnd.wolfram.wl
Magic Bytes
Offset 0
23 21 2F 75 73 72 2F 62 69 6E 2F 65 6E 76 20 77 6F 6C 66 72 61 6D 73 63 72 69 70 74
Sources: Apache Tika
Extension
.wl
MIME Type
application/vnd.wolfram.wl
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .wl files in Python
def is_wl(file_path: str) -> bool:
"""Check if file is a valid WL by magic bytes."""
signature = bytes([0x23, 0x21, 0x2F, 0x75, 0x73, 0x72, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x65, 0x6E, 0x76, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x72, 0x61, 0x6D, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74])
with open(file_path, "rb") as f:
return f.read(28) == signature
How to validate .wl files in Node.js
function isWL(buffer: Buffer): boolean {
const signature = Buffer.from([0x23, 0x21, 0x2F, 0x75, 0x73, 0x72, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x65, 0x6E, 0x76, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x72, 0x61, 0x6D, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]);
return buffer.subarray(0, 28).equals(signature);
}
How to validate .wl files in Go
func IsWL(data []byte) bool {
signature := []byte{0x23, 0x21, 0x2F, 0x75, 0x73, 0x72, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x65, 0x6E, 0x76, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x72, 0x61, 0x6D, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74}
if len(data) < 28 {
return false
}
return bytes.Equal(data[:28], signature)
}
API Endpoint
/api/v1/wl
curl https://filesignature.org/api/v1/wl
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .wl file?
A .wl file is a WL file.
What are the magic bytes for .wl files?
The magic bytes for WL files are 23 21 2F 75 73 72 2F 62 69 6E 2F 65 6E 76 20 77 6F 6C 66 72 61 6D 73 63 72 69 70 74 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .wl file?
To validate a .wl file, read the first bytes of the file and compare them against the known magic bytes (23 21 2F 75 73 72 2F 62 69 6E 2F 65 6E 76 20 77 6F 6C 66 72 61 6D 73 63 72 69 70 74) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .wl files?
The primary MIME type for .wl files is application/vnd.wolfram.wl.
Is it safe to open .wl files?
WL (.wl) 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.