This guide covers every common way a Bitcoin Core wallet goes wrong — a deleted wallet.dat, a corrupt file that won't open, a restored backup that shows no balance, and very old wallets that modern software refuses to load. It applies equally to Bitcoin-Qt, the older name for the same wallet, so if you're seeing "Bitcoin-Qt corrupted" or a wallet.dat that won't open in Bitcoin-Qt, you're in the right place. Litecoin, Dogecoin, Bitcoin Cash, and many other coins share Bitcoin Core's wallet format, so the same techniques apply to them. I assume you know the wallet password or there is no password — forgotten passwords are a different problem, covered on our forgotten wallet password recovery page.
This information is based on years of doing exactly this work for clients of my Bitcoin Core wallet recovery service. If you'd rather have it done for you — or your first attempt didn't work — request a free assessment; there's no fee until your coins are back.
Before you try anything below: make one read-only copy of everything. Copy wallet.dat (if it exists) and, for deleted-file cases, stop writing to the drive entirely. Most of the unrecoverable cases I see were recoverable until someone's third or fourth experiment overwrote the data.
Find your error, jump to the fix
Locked out of a wallet like this one?
I repair hardware wallets, crack forgotten passwords, and rebuild broken seed phrases — on my own bench in Denver.
Bitcoin Core and Bitcoin-Qt throw a handful of terse errors for very different underlying problems. Match the exact wording you're seeing:
| What you're seeing | What it usually means | Go to |
|---|---|---|
ERROR: wallet.dat corrupt, salvage failed |
The Berkeley DB file is damaged | Fixing a corrupt wallet |
error loading wallet.dat |
Corruption, or a legacy format a new version won't open | Corrupt wallet / Restoring a backup |
wallet.dat not opening / "not found" |
File deleted, moved, or in a different data directory | Deleted wallet.dat |
wallet.dat bad decrypt / wrong password |
Password mismatch (forgotten password) | Password recovery |
| Opened fine, but balance is zero, low, or unfamiliar | Not synced, wrong file, or missing change | Restored but no balance |
No wallet.dat anywhere in the data directory |
Named wallet in a subfolder, custom path, or genuinely deleted | Where Bitcoin Core keeps wallet.dat |
| New version refuses to load an old wallet | Legacy Berkeley DB format being phased out | Restoring a backup |
Where Bitcoin Core keeps wallet.dat, and what to do if there is no wallet.dat
The wallet lives in the Bitcoin Core data directory, unless you created it with a custom name or location:
- Windows:
%APPDATA%\Bitcoin\(paste that into Explorer's address bar) — the file iswallet.dat, or look inside thewallets\subfolder - Mac:
~/Library/Application Support/Bitcoin/ - Linux:
~/.bitcoin/
Named wallets created in newer versions live in their own subfolder under wallets\, each with its own wallet.dat. If you "lost" your wallet after reinstalling or updating, check here first — uninstalling Bitcoin Core does not delete your wallet. The data directory survives reinstalls, and simply pointing a fresh install at it (or copying wallet.dat back in) restores everything.
If there is no wallet.dat in that folder at all, it is usually one of four things, in descending order of likelihood. A named wallet created in a newer version, sitting in its own subfolder under wallets\ rather than at the top level. A custom data directory, set with -datadir at some point and long forgotten. A wallet that was never created on this machine, because you are looking at a fresh install rather than the original one. Or a genuinely deleted file, which is the deleted wallet.dat case below. Check the first three before assuming the fourth.
If you have turned up several candidate files and cannot tell which is which, our free wallet file inspector identifies what a file is and what it holds, entirely in your browser, without the file leaving your machine.
Recovering a deleted wallet.dat
If the file itself was deleted, check for backups first: old external drives, cloud folders (Dropbox/Google Drive sync from years ago), email attachments to yourself, and the wallets/ folder of every computer you've owned. A wallet backup from years ago is still fully usable — old keys don't expire — though see the note about pre-2013 key pools on restored wallets that show less than you expect.
1: Undelete and PhotoRec. Until the file is overwritten by new data, a deleted file is still physically on the drive. On Windows, Recuva is free; PhotoRec/TestDisk is free and cross-platform (Windows/Mac/Linux) and understands raw file signatures, which helps when the filesystem entry is gone. The one thing to know before you start is that PhotoRec has no wallet.dat signature, so it returns your wallet under a generic name like f0012345.db and most people conclude it failed when it had in fact worked. The full run-through, including which signatures to switch on and how to sift the output, is in does PhotoRec recover a wallet.dat.
2: Volume Shadow Copies (Windows). Windows sometimes keeps automatic point-in-time copies as part of restore points. Right-click the folder that contained the wallet → Properties → Previous Versions, or use a tool like ShadowExplorer to browse old snapshots.
A hard truth about SSDs: on a modern SSD, the TRIM command usually erases deleted data within minutes — undelete tools that work well on spinning hard drives mostly fail on SSDs. Deleted-wallet recovery from an HDD is often successful; from a TRIM-enabled SSD it rarely is. This is exactly the case where you should stop and get a professional assessment before running more tools against the drive.
Formatted drives: a "quick format" only rewrites the filesystem table, and file-signature scanners like PhotoRec can often still find the wallet. A full format or a zeroed/encrypted-then-reset drive is generally not recoverable by software.
"ERROR: wallet.dat corrupt, salvage failed" — fixing a corrupt wallet

Corrupt wallets are usually the product of interrupted writes, failing drives, or a partially-overwritten file recovered by an undelete tool. Bitcoin Core may refuse to start, or fail with "error loading wallet.dat" or "ERROR: wallet.dat corrupt, salvage failed." You have several options, in increasing order of difficulty:
1: Bitcoin Core's own salvage. Old versions had a -salvagewallet startup flag. In current releases that flag is gone; salvage moved to the bitcoin-wallet command-line tool that ships in the same folder as bitcoind:
bitcoin-wallet -wallet=wallet.dat -dumpfile=dump.txt dump
or, to attempt an in-place repair on a copy of the file:
bitcoin-wallet -wallet=/path/to/copy-of-wallet.dat salvage
Salvage scans the Berkeley DB file for intact key records and rebuilds a wallet from whatever it can read. It's the first thing to try and works on mildly corrupted files.
2: Dump the keys with pywallet.
python pywallet.py --dumpwallet > wallet.txt
Then find the address holding your Bitcoin and sweep its private key into a fresh wallet. Warning: trojaned copies of pywallet have circulated — download only from the original repository, verify what you're running, and work offline.
3: Extract keys with bitcoinj's wallet-tool — useful when pywallet chokes. If the wallet is encrypted, decrypt a copy first:
openssl enc -d -aes-256-cbc -a -in /path/to/wallet.dat -out ~/wallet-decrypt.dat
then build bitcoinj and run:
./wallet-tool dump --dump-privkeys --wallet=~/wallet-decrypt.dat > wallet.txt
4: Hex-editor key carving. Bitcoin Core private keys sit in the file behind a recognizable byte pattern. Open the wallet in a hex editor and search for the byte string 0201010420 — the thirty-two bytes that follow are often a raw private key. This also works on fragments of a wallet file carved off a damaged drive, which is why a partially-overwritten wallet is not automatically hopeless. This is the technique we use on the worst cases, automated across the whole drive image.
If the file came off a failing or clicking drive, don't keep flogging the hardware — image it once with ddrescue (or send it in; see our shipment instructions) and work from the image.
Restoring a wallet.dat backup into modern Bitcoin Core
How do I restore a wallet in Bitcoin Core?
Put the wallet.dat in the data directory and load it, or use File → Restore Wallet and point it at the backup. That is the whole operation. The complications below are all about age: what a recent release will and will not open.
Recent versions of Bitcoin Core are phasing out the legacy Berkeley DB wallet format that every pre-2021 wallet.dat uses. The newest releases can migrate an old wallet but can no longer simply open it:
- In the GUI: File → Restore Wallet loads a backup; if it's a legacy wallet, use Migrate Wallet (or the
migratewalletRPC) to convert it to the modern descriptor format. - If the current version refuses the file outright, load it in an older release (the 0.19–25.x series still opens legacy wallets directly), let it rescan, and send the coins to a new wallet — or run
migratewalletthere. - You don't need to wait days for the blockchain to sync just to see the keys:
dumpprivkey <address>in Window → Console (or a pywallet dump) works immediately, and the keys can be swept into any modern wallet.
Restored your wallet, but the balance is zero, low, or the wrong wallet?
The most common false alarm in Bitcoin Core recovery, and the good news is in the premise: a wallet that opened is a wallet whose keys are readable. A zero balance is nearly always a node that has not been told to go and look for your history, not a loss. The causes, in the order worth checking:
- Not finished syncing. Bitcoin Core shows nothing for coins in blocks it has not processed yet.
- Needs a rescan. A restored wallet was not loaded when its own transactions confirmed, so the node has never connected those blocks to these keys.
rescanblockchainin the console fixes it. - Pruned node. A rescan has to read real blocks, and pruning deleted them. This is why some people rescan repeatedly and stay at zero.
- Wrong
wallet.dat. Most long-time users have several. Check the addresses against a block explorer rather than trusting the balance field. - Pre-2013 backup, missing change. Old wallets pre-generated only 100 spare keys; change from spending done after the backup went to keys the backup never knew about.
- Wrong coin or network. A Litecoin or testnet
wallet.datopens in Bitcoin Core and shows nothing.
Each of these has a different fix, and the pruned-node and keypool cases in particular are where people waste weeks. The full walk-through, with the console commands and how to tell the cases apart, is in Bitcoin Core restored but no balance.
When to stop and get help
Each of these steps destroys evidence if done wrong — an undelete tool writing to the source drive, a salvage run against the only copy of the file, a trojaned pywallet build. The honest rule I give everyone: you get one safe attempt for free; make it count, or make an image first. If the wallet holds more than pocket change and the first careful attempt fails, that's the point to get a free professional assessment — we do corrupt and deleted wallet-file recovery and Bitcoin Core recovery on a no-recovery, no-fee basis, and we'll tell you honestly if your case isn't worth pursuing.
If this guide helped you recover your Bitcoin, consider sending a tip to 3PoVZA7CZCo8df7WKXZXGskGqTfDacsDah
