Microsoft Document Imaging file

image/vnd.ms-modi

Safe

Magic Bytes

Offset: 0
45 50 2A 00

Microsoft Document Imaging (MDI) is a proprietary graphics format developed by Microsoft, derived from the Tagged Image File Format (TIFF) specification. It was primarily designed to store scanned documents, optical character recognition (OCR) data, and annotations within the Microsoft Office Document Imaging (MODI) component of Office 2003 and 2007. This legacy format is now considered obsolete; Microsoft deprecated support in Office 2010, encouraging migration to standard PDF or TIFF files for long-term accessibility.

Extension

.mdi

MIME Type

image/vnd.ms-modi

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .mdi files in Python

Python
def is_mdi(file_path: str) -> bool:
    """Check if file is a valid MDI by magic bytes."""
    signature = bytes([0x45, 0x50, 0x2A, 0x00])
    with open(file_path, "rb") as f:
        return f.read(4) == signature

How to validate .mdi files in Node.js

Node.js
function isMDI(buffer: Buffer): boolean {
  const signature = Buffer.from([0x45, 0x50, 0x2A, 0x00]);
  return buffer.subarray(0, 4).equals(signature);
}
Go
func IsMDI(data []byte) bool {
    signature := []byte{0x45, 0x50, 0x2A, 0x00}
    if len(data) < 4 {
        return false
    }
    return bytes.Equal(data[:4], signature)
}

API Endpoint

GET /api/v1/mdi
curl https://filesignature.org/api/v1/mdi

Related Formats