Skip to content

MPX magic bytes (.mpx)

.mpx file signature: 4D 50 58 2C 4D 69 63 72 6F 73 6F 66 74 20 50 72 6F 6A 65 63 74 20 66 6F 72 20 57 69 6E 64 6F 77 73 2C | application/x-project

MPX is a text-based project interchange file format originally developed by Microsoft for Microsoft Project and related scheduling tools. It is used to exchange task lists, resource assignments, calendars, and dependencies between project management applications. MPX is a legacy format and is less commonly supported in modern software, but it is generally considered safe because it does not normally contain executable content.

Safe

Magic Bytes

Offset 0
4D 50 58 2C 4D 69 63 72 6F 73 6F 66 74 20 50 72 6F 6A 65 63 74 20 66 6F 72 20 57 69 6E 64 6F 77 73 2C

Sources: Apache Tika

Validation Code

How to validate .mpx files in Python

Python
def is_mpx(file_path: str) -> bool:
    """Check if file is a valid MPX by magic bytes."""
    signature = bytes([0x4D, 0x50, 0x58, 0x2C, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x2C])
    with open(file_path, "rb") as f:
        return f.read(34) == signature

How to validate .mpx files in Node.js

Node.js
function isMPX(buffer: Buffer): boolean {
  const signature = Buffer.from([0x4D, 0x50, 0x58, 0x2C, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x2C]);
  return buffer.subarray(0, 34).equals(signature);
}

How to validate .mpx files in Go

Go
func IsMPX(data []byte) bool {
    signature := []byte{0x4D, 0x50, 0x58, 0x2C, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x2C}
    if len(data) < 34 {
        return false
    }
    return bytes.Equal(data[:34], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .mpx file?

A .mpx file is identified by the magic bytes 4D 50 58 2C 4D 69 63 72 6F 73 6F 66 74 20 50 72 6F 6A 65 63 74 20 66 6F 72 20 57 69 6E 64 6F 77 73 2C at byte offset 0. MPX is a text-based project interchange file format originally developed by Microsoft for Microsoft Project and related scheduling tools. It is used to exchange task lists, resource assignments, calendars, and dependencies between project management applications. MPX is a legacy format and is less commonly supported in modern software, but it is generally considered safe because it does not normally contain executable content.

What are the magic bytes for .mpx files?

The magic bytes for MPX (.mpx) files are 4D 50 58 2C 4D 69 63 72 6F 73 6F 66 74 20 50 72 6F 6A 65 63 74 20 66 6F 72 20 57 69 6E 64 6F 77 73 2C at byte offset 0. These bytes identify the file format more reliably than the extension alone.

How do I validate a .mpx file?

To validate a .mpx file, read the first bytes of the file and compare them against the known magic bytes (4D 50 58 2C 4D 69 63 72 6F 73 6F 66 74 20 50 72 6F 6A 65 63 74 20 66 6F 72 20 57 69 6E 64 6F 77 73 2C) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .mpx files?

The primary MIME type for .mpx files is application/x-project.

Is it safe to open .mpx files?

MPX (.mpx) 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.