Skip to content

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.

Safe

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.

Hex Signature Offset Sources
3C 3C 3C 20 4F 72 61 63 0 Wikipedia
6C 65 20 56 4D 20 56 69 0 Wikipedia
72 74 75 61 6C 42 6F 78 0 Wikipedia
20 44 69 73 6B 20 49 6D 0 Wikipedia
61 67 65 20 3E 3E 3E 0 Wikipedia

Extension

.vdi

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .vdi files in Python

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

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

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

GET /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.