VDI (.vdi)
.vdi file signature | application/octet-stream
Virtual Disk Image (VDI) is a virtual disk file format developed and maintained by Oracle for use with VirtualBox. It is used to store the contents of a virtual machine’s hard drive, including operating systems, applications, and data, and is commonly used in virtualization, testing, and system migration. The format is generally safe, though any disk image can contain malicious software or compromised data if obtained from untrusted sources.
Magic Bytes
Offset 0
3C 3C 3C 20 4F 72 61 63
Sources: Wikipedia
All Known Signatures
5 signature variants are documented for .vdi files across multiple sources.
Extension
.vdi
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .vdi files in Python
def is_vdi(file_path: str) -> bool:
"""Check if file is a valid VDI by magic bytes."""
signature = bytes([0x3C, 0x3C, 0x3C, 0x20, 0x4F, 0x72, 0x61, 0x63])
with open(file_path, "rb") as f:
return f.read(8) == signature
How to validate .vdi files in Node.js
function isVDI(buffer: Buffer): boolean {
const signature = Buffer.from([0x3C, 0x3C, 0x3C, 0x20, 0x4F, 0x72, 0x61, 0x63]);
return buffer.subarray(0, 8).equals(signature);
}
How to validate .vdi files in Go
func IsVDI(data []byte) bool {
signature := []byte{0x3C, 0x3C, 0x3C, 0x20, 0x4F, 0x72, 0x61, 0x63}
if len(data) < 8 {
return false
}
return bytes.Equal(data[:8], signature)
}
API Endpoint
/api/v1/vdi
curl https://filesignature.org/api/v1/vdi
See the full API documentation for all endpoints and parameters.
Related Formats
Frequently Asked Questions
What is a .vdi file?
A .vdi file is identified by the magic bytes 3C 3C 3C 20 4F 72 61 63 at byte offset 0. Virtual Disk Image (VDI) is a virtual disk file format developed and maintained by Oracle for use with VirtualBox. It is used to store the contents of a virtual machine’s hard drive, including operating systems, applications, and data, and is commonly used in virtualization, testing, and system migration. The format is generally safe, though any disk image can contain malicious software or compromised data if obtained from untrusted sources.
What are the magic bytes for .vdi files?
The magic bytes for VDI files are 3C 3C 3C 20 4F 72 61 63 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .vdi file?
To validate a .vdi file, read the first bytes of the file and compare them against the known magic bytes (3C 3C 3C 20 4F 72 61 63) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .vdi files?
There is no officially registered MIME type for .vdi files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .vdi files?
VDI (.vdi) 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.