Microsoft SQL Server 2000 database

application/octet-stream

Safe

Magic Bytes

Offset: 0
01 00 00 00

The Microsoft SQL Server Master Database File is a proprietary file format created by Microsoft to serve as the primary data storage container for SQL Server instances. Serving as the core database component, it stores the complete schema, data tables, and internal system records required for server operations. Although this specific signature identifies legacy files from SQL Server 2000, the format remains standard in modern iterations, necessitating strict access controls to prevent unauthorized data extraction.

Extension

.mdf

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .mdf files in Python

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

How to validate .mdf files in Node.js

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

API Endpoint

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

Related Formats