How to Download Your Outlook Emails
On this page
To download Outlook email, first decide whether you need a copy of one message or an archive of a mailbox. Outlook’s built-in export creates mailbox files for use with Outlook. To save each message as a Markdown file on your computer, use mailmd. Markdown is plain text with simple formatting, so you can read the files in an editor and search them with common tools.
The steps depend on whether you use Outlook in a browser, new or classic Outlook for Windows, or Outlook for Mac. A PST file is an Outlook data file that holds exported mailbox items; an OLM file serves a similar purpose for legacy Outlook for Mac. For a readable, searchable archive that stays in ordinary files, use mailmd. For a mailbox file intended to work with Outlook, use Outlook’s export.
Save one message from Outlook #
In Outlook on the web, open or select the message, choose More actions > Download, and save the EML or MSG file. EML and MSG are file formats for individual email messages. In new Outlook for Windows, choose More actions > Save as. In classic Outlook, open the message in its own window and select File > Save As. Microsoft lists these options in its instructions for saving an Outlook message.
To keep a message as a printable document, use Print and select Microsoft Print to PDF on Windows. A PDF is useful for reading or sharing, but it is not a mailbox archive. Save attachments separately if you need copies of them.
Export a mailbox from Outlook #
In classic Outlook for Windows, select File > Open & Export > Import/Export, choose Export to a file, then choose Outlook Data File (.pst). Select the mailbox or folder, include subfolders when you want their contents, and choose where to save the PST. Microsoft provides the classic Outlook export steps.
Before exporting, confirm Outlook has downloaded the older messages you need. When Outlook uses Cached Exchange Mode, it exports items stored in its local cache. The cache might not contain the entire mailbox on the server. Set the download range to All in the account sync settings, then wait for Outlook to finish syncing. A University of Colorado Outlook export guide notes that the default download range is one year.
New Outlook for Windows has an export wizard under Settings > Files > Export. Follow its prompts to choose the mailbox or folders. If the wizard offers a choice between copying messages and moving them to Deleted Items, choose Copy for a backup. Microsoft’s PST export documentation covers both Outlook versions.
For an Outlook.com mailbox, Microsoft documents bulk export through desktop Outlook. Its Outlook.com export instructions describe using classic Outlook in Reduced Functionality Mode without a subscription or trial.
On Mac, Microsoft documents exporting an OLM archive through Tools > Export in legacy Outlook for Mac. Microsoft says legacy Outlook stops working with Exchange Online mailboxes starting in October 2026. Check Microsoft’s legacy Outlook for Mac support notice before relying on that route.
Download Outlook email with mailmd #
mailmd copies messages into a folder on your computer, with one Markdown file per message. It reads mail without marking it as read, moving it, or deleting it. Attachments are saved beside their messages, and you can also keep the original EML files.
On macOS, Linux, or Windows in Git Bash, install mailmd and connect an IMAP mailbox like this:
curl -fsSL https://raw.githubusercontent.com/vincentsch/mailmd/main/install.sh | sh
mailmd connect imap --email you@example.com
mailmd syncThe files go into ~/mail/<account>. Your provider might require an app password, and mailmd prompts you when one is needed. Outlook.com and Microsoft 365 connect through Microsoft Graph, Microsoft’s service for accessing Microsoft 365 data, rather than an IMAP password. That connection requires your own OAuth app in Microsoft Entra. Follow the current mailmd setup instructions for the Outlook connection, then run mailmd sync.
Each sync adds new mail and updates read and starred marks. Spam and trash are excluded unless requested; Gmail mail archived with Gmail’s All Mail folder is included. mailmd never deletes files from the archive, even if you later delete those messages from the server.
Check the downloaded copy #
For a PST or OLM export, open the file in a supported Outlook version and inspect older and newer messages, Sent Items, subfolders, and important attachments. Keep the original mailbox until you have checked the export. For mailmd, open a few Markdown files and confirm that attachments appear beside them. You can search the archive with a text editor or tools such as rg and grep.
Free and open source
Try mailmd
mailmd is a free command-line tool that copies your email into Markdown files on your computer, one file per message. It works with any IMAP mailbox, and with Gmail and Outlook through their own APIs.
Install
$ curl -fsSL https://raw.githubusercontent.com/vincentsch/mailmd/main/install.sh | sh
Set it up with your coding agent
Set up mailmd so you can read my email. Use https://github.com/vincentsch/mailmd: read its AGENTS.md and follow the steps. Connect my mailbox and run the first sync. Then show me where the files are.