← Back to blog

September 27, 2026

How to Recover Bitcoin From an Old Wallet.dat File

Lancelot-A FPGA based bitcoin mining board
"File:Lancelot-A FPGA based bitcoin mining board.jpg" by 张楠赓 is marked with CC0 1.0. To view the terms, visit https://creativecommons.org/publicdomain/zero/1.0/deed.en.

If you've turned up an old wallet.dat file on a backup drive or a computer you haven't touched in years, recovering the Bitcoin inside it is frequently possible, but the path depends entirely on what's actually in that file and whether you can remember the password protecting it. A wallet.dat file is the data file that Bitcoin Core (and several older wallet clients built on the same Berkeley DB storage format) uses to hold your private keys, and it deserves careful handling before you do anything else with it.

What's actually inside a wallet.dat file

A wallet.dat file is a Berkeley DB (BDB) database — Bitcoin Core switched newer wallets to SQLite starting around version 0.21, but any wallet created before that migration, or one that was never explicitly migrated, still uses the older BDB format. Inside, it stores your private keys, a keypool of pre-generated unused keys, your transaction metadata, and address book entries. If you ran encryptwallet at any point, the private keys themselves are encrypted with AES-256-CBC, and the key used to decrypt them is derived from your passphrase.

That last detail matters more than people realize: encrypting the wallet does not touch the file's transaction history or its structure — only the private keys are locked. So a password-protected wallet.dat file with a balance on the blockchain has that Bitcoin sitting there, provably, whether or not you can currently unlock the keys.

If the wallet isn't encrypted

Some older wallets were never encrypted at all, especially ones set up in Bitcoin's early years before encryptwallet was common practice. In that case, recovery is mostly a matter of getting Bitcoin Core (or a compatible tool) to read the file correctly:

  1. Install a version of Bitcoin Core close to whatever era the wallet was created in, if the current version won't load it directly — very old wallet.dat files occasionally need an intermediate version to open cleanly before they can be migrated forward.
  2. Place the file in the correct wallet directory and let Bitcoin Core import it, or use dumpwallet / dumpprivkey once it's loaded to extract the private keys directly.
  3. Sweep the recovered keys into a new, current wallet rather than continuing to use the old file long-term.

If you remember the password (or something close to it)

If the wallet is encrypted and you have the passphrase, unlocking it is straightforward: open it in Bitcoin Core, use walletpassphrase, and the keys decrypt normally. The harder, far more common case is a partially remembered password — maybe you know the base word, some special characters you tend to add, or a password you were using around that time.

This is where the situation resembles missing-seed-word recovery: instead of an unbounded guess, you're running a bounded search. Tools like btcrecover are built specifically for this — they take a password pattern (known characters, likely substitutions, capitalization variants) and test each candidate against the wallet's own key-derivation check, which tells you instantly whether a guess is right without needing network access. Password recovery for wallet.dat files is also supported by hashcat's mode for Bitcoin Core wallets, which is meaningfully faster than a pure Python brute force when you have a GPU and a reasonably sized candidate list.

None of this works well against a password you genuinely can't narrow down at all. A fully random or completely forgotten 12+ character password with no partial memory to constrain the search is not practically brute-forceable, and no legitimate tool will claim otherwise.

Where this actually stalls

A few things turn an otherwise recoverable wallet.dat file into a dead end:

  • Corruption. BDB files that were copied mid-write, or that sat on a failing drive, can have unreadable database pages. Bitcoin Core's -salvagewallet option can sometimes rebuild a usable wallet from a partially corrupted file, but it isn't guaranteed.
  • An empty keypool with no transaction history. If the wallet was created and encrypted but never funded, there's nothing to recover — check the addresses against a block explorer before investing time in password recovery.
  • A password with genuinely no recoverable structure. As above — bounded guessing needs a bound.

Safety rules before you touch it

Copy the file before doing anything else — never run recovery attempts against your only copy. Do the actual password recovery and key extraction on a machine you trust, ideally offline, since a decrypted wallet.dat file's private keys are exactly as sensitive as a seed phrase. If you do get it open, don't leave funds sitting in an old wallet generated years ago; sweep them into a new, freshly generated wallet with a current backup you've verified. And exactly as with a recovered seed phrase, treat anyone who contacts you unsolicited offering to "recover" a wallet.dat file for a cut of the funds as a scam — see our what to do after a crypto scam piece for how that pattern typically plays out.

If your situation is closer to a modern wallet with a missing or forgotten seed phrase rather than an old Bitcoin Core data file, the checksum-based approach in how BIP-39 seed phrases work is the more relevant read, and our Recover tool covers that case directly. A wallet.dat file is a different, older format — but like most Bitcoin recovery problems, the odds come down to how much you actually remember, not luck.

— WalletRecover Team