MSG File Format Specification
The MSG file format is a binary file format used by Microsoft Outlook to store email messages, contacts, and other data. It is a proprietary format developed by Microsoft, and its specification is not publicly available. However, various reverse engineering and documentation efforts have provided a comprehensive understanding of the MSG file format.
File Structure
The MSG file format contains multiple sections, each with a specific purpose. The file structure can be broken down into the following sections:
- Header Section: This section contains metadata about the message, such as the message ID, sender, receiver, and subject.
- Message Body Section: This section contains the actual message body, including text, images, and attachments.
- Attachment Section: This section contains the files attached to the message.
- Properties Section: This section contains additional metadata about the message, such as the message's creation date, modification date, and classification.
Header Section
The Header Section is the first section of the MSG file format and contains metadata about the message. The following fields are stored in the Header Section:

- Message ID
- A unique identifier for the message.
- Sender
- The email address of the sender.
- Receiver
- The email address(es) of the receiver(s).
- Subject
- The subject of the message.
- Creation Date
- The date the message was created.
- Modification Date
- The date the message was last modified.
Message Body Section
The Message Body Section contains the actual message body, including text, images, and attachments. The following fields are stored in the Message Body Section:
- Text Body: The plain text version of the message body.
- HTML Body: The HTML version of the message body.
- RTF Body: The Rich Text Format (RTF) version of the message body.
- Attachments: The files attached to the message.
Attachment Section
The Attachment Section contains the files attached to the message. The following fields are stored in the Attachment Section:
- File Name: The name of the attached file.
- File Type: The type of the attached file.
- File Data: The actual file data.
Properties Section
The Properties Section contains additional metadata about the message, such as the message's classification and importance. The following fields are stored in the Properties Section:

- Classification: A classification of the message, such as priority and sensitive.
- Importance: The importance of the message.
- Subject: The subject of the message.
MSG File Format Variants
There are several variants of the MSG file format, including:
- MIME-enabled MSG files: These files contain a MIME header and a body, similar to standard email messages.
- .MSGX files: These files are an extension of the standard MSG file format, allowing for additional metadata and attachments.
MSG File Format Limitations
The MSG file format has several limitations, including:
- Binary format: The MSG file format is a binary format, making it difficult to read and write natively in most programming languages.
- Lack of widely adopted standard: The MSG file format is proprietary, and its specification is not publicly available, making it a widely adopted standard for email messages.
Conclusion
The MSG file format specification is complex and contains multiple sections, including the Header Section, Message Body Section, Attachment Section, and Properties Section. The MSG file format has various limitations, such as its binary format and lack of widely adopted standard. Nonetheless, it is a widely used format for storing email messages and other data in Microsoft Outlook.