How to repair a damaged PST file with the Inbox Repair Tool (SCANPST)
Fix a damaged Outlook PST with SCANPST.EXE: where to find it, how to run it, what the .bak and Lost and Found are, its limits, and how to avoid corruption.
By MoveMyInbox Team9 min read
Outlook Data Files (.pst) are sturdy, but they’re not indestructible. A crash while Outlook was writing, a full disk, a flaky network drive or a sync app grabbing the file at the wrong moment can leave a PST that Outlook refuses to open or that behaves strangely.
Microsoft ships a free tool for exactly this: the Inbox Repair Tool, better known by its file name, SCANPST.EXE. This guide shows where to find it in current versions of Outlook, how to run it safely, how to get your mail back from the recovered folders, what it can’t fix, and how to keep it from happening again.
Routing slip · In this article
Signs that a PST file is damaged
Corruption rarely announces itself politely. These are the usual signs:
- Outlook shows a message that errors have been detected in the file and suggests running the Inbox Repair Tool.
- Outlook says the file is not an Outlook data file or cannot be accessed.
- Outlook freezes or crashes when you open a particular folder, or every time it starts.
- Folders appear empty, message counts look wrong, or searches miss mail you know is there.
- Moving or deleting items fails with vague errors.
Not every one of these is corruption. A PST on a network drive, a file still being copied, or a PST that has hit its size limit can produce similar errors. If the file is close to 50 GB, read Outlook PST size limits explained first: a full file just stops accepting new mail and doesn’t need repairing.
First, make a copy
Before you run any repair, close Outlook and copy the PST somewhere safe, for example an external drive. SCANPST makes its own backup, but a second copy you control costs nothing and protects you if something goes wrong.PST or OST? Check which file you have
SCANPST is for .pst files: archives, exported mail, POP3 data files and PSTs you opened yourself. Microsoft 365, Outlook.com and Exchange accounts (and, in recent versions of Outlook, IMAP accounts too) use an .ost file instead. An OST is only a local copy of a mailbox that lives on the server.
Microsoft’s advice for a damaged OST is not to repair it but to recreate it: close Outlook, delete (or rename) the .ost file, and start Outlook again. It downloads a fresh copy from the server. Microsoft notes that the Inbox Repair Tool doesn’t scan Exchange mailbox data, so running it on an OST won’t fix your mailbox.
To see which file a folder belongs to, open File → Account Settings → Account Settings in classic Outlook and look at the Data Files tab. It lists each file’s name, type and location. Click Open File Location to jump to it. If you’re unsure about the difference, see OST vs PST.
Deleting an OST is only safe if everything is on the server
Anything that exists only in the OST, such as mail in an Outbox that never sent, is lost when you delete it. If in doubt, rename the file (add.old to the end) instead of deleting it.Where to find SCANPST.EXE
The Inbox Repair Tool is installed with classic Outlook for Windows, but there’s no shortcut to it in the Start menu. You have to open it from the Office program folder. For Outlook 2016, 2019, 2021, 2024 and Microsoft 365, which all use the Office16 folder, it is usually in one of these places:
| Installation | Folder |
|---|---|
| Click-to-Run (Microsoft 365 and most retail versions), 64-bit Office | C:\Program Files\Microsoft Office\root\Office16 |
| Click-to-Run, 32-bit Office on 64-bit Windows | C:\Program Files (x86)\Microsoft Office\root\Office16 |
| MSI (volume licence) installations | C:\Program Files\Microsoft Office\Office16 or the (x86) equivalent |
| Outlook 2013 (Click-to-Run) | C:\Program Files\Microsoft Office 15\root\Office15 or the (x86) equivalent |
Most PCs bought in the last few years run 64-bit Office, so try the first folder first. If it isn’t there, check the others, or type scanpst.exe into File Explorer’s search box while you’re in C:\Program Files and C:\Program Files (x86).
Can’t find it anywhere, or it won’t start? Microsoft’s suggestion is to repair Office: in Windows, open Settings → Apps → Installed apps, find Microsoft 365 or Office, choose Modify, and run a Quick Repair (or an Online Repair if that doesn’t help).
Only using the new Outlook?
The new Outlook for Windows doesn’t come with its own repair tool. Its PST support relies on classic Outlook being installed, so if you can open PSTs there, SCANPST should be in the classic Outlook folder above.How to run the Inbox Repair Tool
- Close Outlook completely. Check Task Manager for a leftover
OUTLOOK.EXEprocess and end it if necessary; SCANPST can’t work on a file Outlook still has open. - Double-click
SCANPST.EXEin the folder from the previous section. - Click Browse and select the PST. Not sure where it is? The Data Files tab in Account Settings shows the path; by default PSTs live in
Documents\Outlook Files. - Click Start. The scan runs through several phases and can take from a minute to well over an hour for a large file.
- If it finds errors, make sure Make backup of scanned file before repairing is ticked, note the backup’s name and location, and click Repair.
- When it reports Repair complete, run it again on the same file. Microsoft notes the tool may need several passes; repeat until a scan finds no errors.
- Start Outlook with the profile that uses the repaired file and check your folders.
The Options button lets you choose whether SCANPST writes a log file. Keep it on: the log (a .log file next to the PST) records what was changed or removed.
The .bak file, Recovered Personal Folders and Lost and Found
The backup (.bak) file
With the backup option ticked, SCANPST saves an untouched copy of the original file in the same folder, with the same name and a .bak extension, for example archive.bak next to archive.pst. Don’t delete it until you’re happy with the result.
Recovered Personal Folders and Lost and Found
Usually the repaired PST simply opens as before. When the folder structure itself was damaged, you may instead see a set of folders called Recovered Personal Folders (Inbox, Sent Items, Calendar and so on) and a folder named Lost and Found. Press Ctrl+6 for the Folder List if you can’t see them.
- The recovered default folders are often empty, because they were rebuilt from scratch.
- Lost and Found holds the folders and items the tool rescued but couldn’t put back where they belonged.
Microsoft’s recommended clean-up is:
- Create a new, empty PST: File → Account Settings → Account Settings → Data Files → Add.
- Drag the folders and items from Lost and Found into the new PST.
- Once everything is moved, remove the Recovered Personal Folders file from your profile.
Getting more out of the backup
If items are still missing, you can try to import from the backup. Copy the .bak file, rename the copy with a .pst extension (for example archive-backup.pst), and import it with File → Open & Export → Import/Export → Import from another program or file → Outlook Data File (.pst), choosing Do not import duplicates. The steps are the same as in our PST import guide. Remember the backup is the damaged original, so this often fails; it’s a last attempt, not a guaranteed win.
What SCANPST can’t fix
The Inbox Repair Tool checks the PST’s internal database structures and makes them consistent again. That’s powerful, but it has clear limits:
- It removes what it can’t read. If a block of the file is unreadable, SCANPST deletes it, and any message that depended on it goes with it. The log file lists these removals.
- It can’t bring back permanently deleted mail, or items that were damaged beyond repair.
- It can’t fix a file that is truncated or mostly overwritten, for example one that stopped copying halfway or was replaced by a sync conflict.
- It doesn’t repair OST files or your mailbox on the server. Recreate the OST instead.
- It doesn’t touch a password-protected PST without the password, and it won’t fix problems in Outlook itself, such as a bad add-in or a broken profile.
If SCANPST keeps finding errors or the file won’t open at all, restore the PST from a backup. Third-party recovery tools exist, but results vary, and you’d be trusting them with your entire mail history. Try your backups first.
If the PST came from somewhere else, rebuild it
Many PSTs are copies of mail that still exists elsewhere. Before fighting with a badly damaged file, ask where its contents came from:
- Exported from a Microsoft 365, Outlook.com or IMAP mailbox? If the mailbox still exists, export a fresh PST from it.
- Converted from Gmail, Thunderbird or Apple Mail? If you still have the Google Takeout download or the mbox files, a new conversion produces a clean file. MoveMyInbox doesn’t repair PSTs, but it does create new Unicode PSTs from mbox files, keeping folders, attachments, and read and flagged status.
- The only copy, on one computer? Then the PST is irreplaceable, which is exactly why the next section matters.
If you’re archiving an account you’re about to close, keep the original export as well as the PST. See how to archive an email account before closing it.
How to keep PST files from getting damaged
- Keep PSTs on a local drive. Microsoft says network use of PST files isn’t meant for continuous use, warns that a PST used over a network connection may be corrupted if the connection degrades or fails, and supports networked PSTs only in specific remote-desktop setups.
- Don’t keep an open PST in a synced folder. A PST changes constantly while Outlook is running, which sync apps handle badly. Microsoft notes that OneDrive syncs PST files less often than other files, and publishes instructions for moving a PST out of OneDrive. Dropbox, Google Drive and iCloud Drive face the same basic problem. To back a PST up to the cloud, close Outlook and copy the file.
- Close Outlook properly. Exit Outlook before shutting down, and give it time to finish. Don’t unplug an external drive holding an open PST.
- Watch the size. Large PSTs aren’t corrupt by nature, but they’re slower to open and repair, and more mail is at risk if one goes wrong. Several medium-sized files (per year or per account) are easier to manage than one huge one. Old ANSI PSTs near 2 GB are especially fragile.
- Back up regularly. Copy your PSTs to an external drive or cloud storage while Outlook is closed, and keep more than one generation. A backup is the only fix for a file SCANPST can’t save.
- Compact after big clean-ups. Data File Properties → Advanced → Compact Now reclaims space from deleted items.
Frequently asked questions
Where is SCANPST.EXE in Microsoft 365?
For Click-to-Run installations of Microsoft 365 and Outlook 2016 to 2024, look in C:\Program Files\Microsoft Office\root\Office16 (64-bit Office) or C:\Program Files (x86)\Microsoft Office\root\Office16 (32-bit Office). If it isn’t there, repair Office from Windows Settings.
Is it safe to run the Inbox Repair Tool?
Generally yes, but it can remove items it can’t read. Close Outlook, make your own copy of the PST first, and keep the .bak file SCANPST creates until you’re sure nothing is missing.
Should I run SCANPST on an OST file?
No. An OST is a local copy of a server mailbox. Microsoft recommends closing Outlook and deleting or renaming the OST so Outlook downloads a fresh copy, after checking that nothing exists only in that file.
Why do I see Recovered Personal Folders and Lost and Found?
They appear when SCANPST had to rebuild the folder structure. The default folders are often empty; the rescued items are in Lost and Found. Move them into a new PST, then remove the recovered file from your profile.
How many times should I run SCANPST?
Run it again after each repair until a scan reports no errors. Microsoft notes that several passes may be needed to fully repair a file.
Can MoveMyInbox repair my PST file?
No. MoveMyInbox only converts mbox mailboxes into new PST files. If your mail also exists as mbox, for example in a Google Takeout download, it can create a fresh PST from that.
Yours, the MoveMyInbox Team
Published