Microsoft Write file (.wri)
.wri file signature | application/x-mswrite
Microsoft Write file
Magic Bytes
Offset 0
31 BE 00 00
Sources: Apache Tika
All Known Signatures
6 signature variants are documented for .wri files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 31 BE 00 00 | 0 | Apache Tika |
| 32 BE 00 00 | 0 | Apache Tika |
| 30 37 30 37 30 | 0 | Gary Kessler |
| 31 BE | 0 | Gary Kessler |
| 32 BE | 0 | Gary Kessler |
| BE 00 00 00 AB 00 00 00 00 00 00 00 00 | 0 | Gary Kessler |
Extension
.wri
MIME Type
application/x-mswrite
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .wri files in Python
def is_wri(file_path: str) -> bool:
"""Check if file is a valid WRI by magic bytes."""
signature = bytes([0x31, 0xBE, 0x00, 0x00])
with open(file_path, "rb") as f:
return f.read(4) == signature
How to validate .wri files in Node.js
function isWRI(buffer: Buffer): boolean {
const signature = Buffer.from([0x31, 0xBE, 0x00, 0x00]);
return buffer.subarray(0, 4).equals(signature);
}
How to validate .wri files in Go
func IsWRI(data []byte) bool {
signature := []byte{0x31, 0xBE, 0x00, 0x00}
if len(data) < 4 {
return false
}
return bytes.Equal(data[:4], signature)
}
API Endpoint
/api/v1/wri
curl https://filesignature.org/api/v1/wri
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .wri file?
A .wri file is a Microsoft Write file file. Microsoft Write file
What are the magic bytes for .wri files?
The magic bytes for Microsoft Write file files are 31 BE 00 00 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .wri file?
To validate a .wri file, read the first bytes of the file and compare them against the known magic bytes (31 BE 00 00) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .wri files?
The primary MIME type for .wri files is application/x-mswrite.
Is it safe to open .wri files?
Microsoft Write file (.wri) 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.