
XstReader
Open Source .NET Library for Outlook OST & PST Files
View, Export & Inspect Microsoft Outlook OST and PST Files via Free Open Source .NET API.
What is XstReader?
XstReader is a free, open source .NET library written entirely in C# that enables developers and end users to view, inspect, and export data from Microsoft Outlook's .ost and .pst files. It requires only .NET Framework 4 and has no dependency on Microsoft Office, making it ideal for environments where Outlook is not installed. The tool presents a classic three-pane mail viewer interface and supports reading encrypted or signed messages when the corresponding certificate is available in the user store.
Built on Microsoft's publicly documented PST file format specification (MS-PST), XstReader goes beyond basic viewing by offering powerful export capabilities via both a GUI and a command-line tool. Users can export email bodies in native formats (HTML, RTF, plain text), attachments, or message properties to CSV. It supports filtering, searching headers, and preserving folder hierarchy during export. The project also includes a portable .NET Core version for cross-platform use on Windows, macOS, and Linux.
Getting Started with XstReader
To get started with XstReader, download the latest release from the official XstReader GitHub repository. Extract the ZIP file to a programs folder and run XstReader.exe. For developers, the XstReader.Base project provides a reusable DLL for reading Outlook files programmatically. Alternatively, use the command-line tools XstExport.exe (Windows) or XstPortableExport.dll (.NET Core) for automation and scripting. No Microsoft Office installation is required.
Install XstReader via GitHub Release
# Download latest release from GitHub
# Extract XstReader.zip to a folder
# Run XstReader.exe
# Or use CLI: dotnet XstPortableExport.dll -e -f="Inbox" input.pst
Export Email Bodies in Native Formats
XstReader allows exporting email bodies in their original format—HTML, Rich Text (RTF), or plain text—preserving inline attachments and formatting. You can export single emails, multiple selected messages, or entire folders. The GUI supports drag-and-drop selection, while the command-line tool enables batch processing and scripting. This is especially useful for archiving, legal discovery, or migrating email content without relying on Outlook. The export process respects folder hierarchy and supports filtering by date or folder path.
How to Export Email Bodies via Command Line?
XstExport.exe -e -f="Sent Items" -s -t="./export" "archive.pst"
Export Attachments Separately
XstReader provides dedicated functionality to export only attachments from Outlook files, which is ideal for data recovery, backup, or analysis. When multiple attachments share the same name, the latest timestamp wins to avoid overwriting. This feature works independently of email body export and supports all attachment types stored in .pst/.ost files. The command-line tool allows precise targeting of folders and subfolders, making it easy to extract specific sets of files without opening Outlook.
How to Export Attachments Only via CLI?
XstExport.exe -a -f="Inbox" -o -t="./attachments" "mail.pst"
Inspect & Export Message Properties to CSV
XstReader enables exporting message metadata—including sender, recipient, subject, date, and custom properties—to a structured CSV file. This is invaluable for auditing, reporting, or importing into databases. The export includes all standard MAPI properties and respects folder structure unless collapsed. The portable .NET Core version ensures compatibility across platforms, and the GUI provides an Info button for quick property inspection. This feature supports both .ost and .pst files without requiring Outlook.
How to Export Message Properties to CSV?
XstExport.exe -p -f="Drafts" -s -t="./props" "inbox.pst"
View Encrypted & Signed Messages
XstReader supports viewing encrypted or digitally signed Outlook messages when the corresponding certificate is present in the user's certificate store. While it does not perform signature verification, it can decrypt and display message content and attachments if the key is available. This makes it suitable for compliance review or archival where signed emails must be reviewed. The feature works seamlessly in both the GUI and command-line tools, preserving the original message structure and formatting.
How to View Encrypted Messages via GUI?
# Open PST/OST in XstReader.exe
# Double-click an encrypted message
# If certificate is installed, content displays automatically
