What is the MSG file format?
Files with the .msg extension are used by Microsoft Outlook to save email messages. The program stores all the most important information regarding an email message in a .msg file, including the subject, body content, sender and receiver data, date, hyperlinks, and attachments.
When is a .msg file created?
Outlook generates a .msg file whenever an email message is being saved or created in the program. However, the file can also be generated in other circumstances - not only for email messages, but also for other special items in Outlook such as calendar appointments, contacts, or tasks. A .msg file is created whenever one of those items is saved to disk or exported from the application.
Opening .msg files
.msg files are not stored in a simple text form but in a binary format - specifically, the Microsoft Compound File Binary (OLE2 structured storage) container, the same underlying format used by legacy .doc and .xls documents. Originally, only applications implementing the MAPI interface (Microsoft's Messaging Applications Programming Interface) could open them reliably, which is why importing .msg files outside Outlook has historically been a bit difficult. Today a wider range of tools supports the format, including dedicated viewers and the msgconvert command-line utility on Linux. .msg files can also be converted to the more portable .eml format for use with other mail clients. Exporting .msg files remains common mainly in order to archive them, store them, or scan embedded attachments with antivirus programs. Related Outlook data stores include .pst files, which aggregate many messages in a single archive.
Security & safety
RISK: MEDIUMA .msg can carry the same threats as any email: malicious attachments, phishing links and tracking pixels. Because attachments are embedded as binary streams, open an unexpected .msg in a proper viewer (which decodes safely) rather than trying to extract files blindly, and don't open the attachments or click links unless you trust the sender. Two extra notes: .msg is binary OLE storage, so renaming it to .txt won't reveal readable content; and when using ONLINE .msg viewers, remember the file is uploaded to a third-party server - don't use them for confidential or sensitive mail.
Format details
in a nutshell- Sound Designer / MIDI message file (.msg) - A rare audio/MIDI data file unrelated to Outlook saved messages.
Programs that open MSG files
Technical details
deep spec| Container format | Microsoft Compound File Binary (OLE2 structured storage) - the same CFB container used by legacy `.doc` and `.xls` files |
| MIME type | `application/vnd.ms-outlook` |
| File signature (magic bytes) | `D0 CF 11 E0 A1 B1 1A E1` at byte offset 0 - the OLE2 CFB header, shared by all Compound File documents |
| Internal layout | Message properties, body text, and attachments stored as individually named streams and sub-storages inside the CFB container |
| Body format options | Stores plain text (`PR_BODY`), HTML (`PR_HTML`), and compressed RTF (`PR_RTF_COMPRESSED`) simultaneously; the client renders the richest available version |
| String encoding | Text properties stored as Unicode (UTF-16LE); older messages may also carry an ANSI/Windows-1252 fallback copy |
| Attachment storage | Each attachment occupies a dedicated sub-storage (`__attach_version1.0_#XXXXXXXX`) holding its own binary data and MAPI property streams |
| Property tag scheme | Each MAPI property uses a 32-bit tag: upper 16 bits = property ID, lower 16 bits = type code (e.g., `PT_UNICODE`, `PT_BINARY`, `PT_SYSTIME`) |
| Supported Outlook item types | Emails (`IPM.Note`), contacts (`IPM.Contact`), tasks (`IPM.Task`), appointments (`IPM.Appointment`), sticky notes (`IPM.StickyNote`), and distribution lists |
| Embedded message nesting | Forwarded or attached emails stored as nested `.msg` sub-storages within the parent file, to arbitrary depth |
| Preserved routing metadata | Sender, all recipient classes (To/Cc/Bcc), delivery timestamps, read/unread flag, importance level, sensitivity, and conversation thread ID |
| Protocol specification | Publicly documented by Microsoft as the [MS-OXMSG] open protocol; enables third-party libraries such as `libpff` and `msg-extractor` |
| Developer | Microsoft Corporation |
| Typical file size | A few kilobytes for text-only messages; can reach hundreds of megabytes when large files are embedded as attachments |
| Released | Late 1990s with Microsoft Outlook; format documented publicly by Microsoft as [MS-OXMSG] |
| Specification | learn.microsoft.com |
MSG conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about MSG files.