Email files explained

OST vs. PST Files in Outlook

Updated 3 min read

With mailmd How to Delete a Gmail Account Without Losing Your Emails
On this page
  1. How OST and PST files handle your data
  2. Choose the file that fits the job
  3. Finding the files in Windows

In Outlook, an OST file stores a local, offline copy of mailbox data from an account such as Microsoft 365, Exchange, Outlook.com, or IMAP. Outlook synchronizes changes with the mail server when the computer reconnects. A PST file stores Outlook data on the computer, commonly for an archive or for a POP account.

The practical difference is where the main copy lives. With an OST file, the server holds the primary mailbox and the file acts as a synchronized cache. With a PST file, the local file holds the data you place in it. Use OST for a connected mailbox and PST when you need a separate local archive or export.

How OST and PST files handle your data #

An OST file lets Outlook show cached mailbox data while you are offline. Messages and other supported changes made offline sync when the account reconnects, while the server remains the primary copy. IONOS describes OST files as storage for Exchange, Microsoft 365, Outlook.com, and IMAP accounts, though the account type and Outlook configuration affect which file Outlook uses. Its description of OST files focuses on Outlook Classic.

A PST file is a separate Outlook data file stored on the computer. People use one to archive mail or move items out of a mailbox. POP accounts have also traditionally used PST files to store messages downloaded to the computer. Data saved in a PST does not automatically sync back to a mail server. For an account-by-account comparison, see IONOS's overview of PST files.

OST PST
Main role Local cache of a server mailbox Local data file for stored or archived items
Where the primary copy lives On the mail server In the PST file on the computer
Offline use Work with cached mailbox data; sync changes after reconnecting Open and work with items stored in the file
Common use Exchange, Microsoft 365, Outlook.com, and IMAP accounts Archives, exports, and traditionally POP accounts
If the local file is lost Server-backed data can be downloaded again if it has synced Data stored only in the PST may be lost

Choose the file that fits the job #

For everyday use with a server-based mailbox, keep Outlook’s OST cache. If the computer loses the cache, Outlook can generally download the mailbox data again, provided the account is still available and the data finished syncing. Before deleting an OST file, check for changes that have not synced and folders stored only on the computer.

Choose a PST when you need a separate archive or an exported copy of Outlook items. Moving mail into a PST can reduce the data stored in a mailbox, but Outlook no longer syncs or manages those messages as part of the mailbox. For example, a PST saved on one computer will not automatically appear in Outlook on another computer.

Before relying on a PST as your only copy, make a backup and consider who can access the file. The University of Washington’s PST records guidance warns that PST files can be fragile, especially when they are large, and are not encrypted by default. Storing mail outside an organization’s mailbox can also put it beyond the organization’s retention and deletion controls.

Finding the files in Windows #

In Outlook for Windows, OST files are commonly stored under AppData\Local\Microsoft\Outlook, while PST files are commonly stored in Documents\Outlook Files. These are default locations, not guarantees: users can choose another PST location, and older Outlook files may be stored elsewhere. A Microsoft Q&A response about Outlook file paths gives these typical Windows paths.

Check Outlook’s account or data-file settings to find the file it uses. Do not assume it is in the default folder. Close Outlook before moving a PST, then open it in Outlook from its new location. Do not delete an OST until Outlook has finished syncing and you have confirmed that any data stored only on the computer is preserved.

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.

More on email files explained