The wallet dat (more precisely, the file wallet.dat) is the wallet file of Bitcoin Core and of many crypto clients based on Bitcoin Core, such as Litecoin Core, Dogecoin Core or Dash Core. It contains the private keys without which the funds cannot be moved. If the file is lost, damaged or the password is forgotten, the coins are still on the blockchain but can no longer be accessed. This guide explains where the wallet dat is located, which formats exist and which ways of crypto recovery are realistic.
Key facts at a glance
- The wallet dat stores private keys, addresses and transaction data, but not the coins themselves.
- Default location on Windows from Bitcoin Core 28:
%LOCALAPPDATA%\Bitcoin\, on older installations%APPDATA%\Bitcoin\. - There are two formats: the older Berkeley DB (legacy wallets) and SQLite (descriptor wallets, the default since Bitcoin Core 23).
- From Bitcoin Core 30, old Berkeley DB wallets can no longer be loaded directly, but they can be migrated to the new format.
- Always work with a copy and never upload the file to websites or send it to strangers.
What does the wallet dat store?
A wallet file does not contain any cryptocurrency. The coins exist only on the blockchain. The wallet dat stores the cryptographic keys that prove you own those coins, plus public keys and addresses, transaction data, address book entries and wallet settings. When you send a transaction, Bitcoin Core signs it with the private key from this file.
This means that anyone who has an unencrypted copy of your wallet dat can transfer your funds. That is why Bitcoin Core lets you encrypt the file with a password. In encrypted wallets the private keys are protected, while public data such as addresses and transactions remain readable.
Where is the wallet dat? Locations on Windows, macOS and Linux
The file is located in the Bitcoin Core data directory, which is hidden by default on all systems. According to the official Bitcoin Core documentation, the default paths are:
| System | Default data directory |
|---|---|
| Windows (Bitcoin Core 28 and later) | %LOCALAPPDATA%\Bitcoin\ |
| Windows (older installations) | %APPDATA%\Bitcoin\ |
| macOS | ~/Library/Application Support/Bitcoin/ |
| Linux | ~/.bitcoin/ |
With version 28, the default directory on Windows moved from AppData\Roaming to AppData\Local. If the old folder already exists, Bitcoin Core keeps using it (release notes 28.0). So check both locations.
Inside the data directory, it depends on the age of the wallet. On older installations, wallet.dat sits directly in the data directory. Newer wallets are stored in the wallets subfolder, named wallets each in their own folder, for example wallets\Savings\wallet.dat. If Bitcoin Core was started with a custom data directory (option -datadir), the file can be somewhere else entirely.
How to open the hidden folder
- Windows: Press Windows key + R, enter
%LOCALAPPDATA%\Bitcoinor%APPDATA%\Bitcoinand press Enter. - macOS: In Finder, choose “Go” and then “Go to Folder” and enter
~/Library/Application Support/Bitcoin/. - Linux: Show hidden files in your file manager (usually Ctrl + H) and open the
.bitcoinfolder in your home directory.
Tip: If you do not know which device held the wallet, search old computers, external hard drives and USB sticks for the file name wallet.dat. Many users copied the file as a backup years ago and forgot where. The Litecoin, Dogecoin or Dash clients use their own folders with the respective name, for example Litecoin instead of Bitcoin.
Found your wallet dat but cannot access it? I will check for free whether and how your wallet can be recovered. Your file stays with you. Request a free assessment
Berkeley DB or SQLite: the two wallet dat formats
For recovery, it is crucial to know which format your file uses. The file name is the same for both.
| Format | Wallet type | Period |
|---|---|---|
| Berkeley DB (BDB) | Legacy wallet | Default up to Bitcoin Core 22 |
| SQLite | Descriptor wallet | Introduced with 0.21, default since Bitcoin Core 23 |
Bitcoin Core 0.21 introduced descriptor wallets, which use SQLite instead of Berkeley DB. Since version 23 they are the default for new wallets. With Bitcoin Core 30, support for legacy wallets was removed: they can no longer be created or loaded, but they can be converted into a descriptor wallet with migratewallet. The graphical interface offers the menu item “Migrate Wallet” for this. If you find an old wallet dat from the 2010s, it is almost always a Berkeley DB file.
Which format does my wallet dat have?
You cannot tell the format from the file name. As a rule of thumb: if the wallet was created with Bitcoin Core 22 or older, roughly before 2022, it is almost always a Berkeley DB file. The format can be determined precisely from the first bytes of the file. I check this as part of the free initial assessment.
Never upload your file to websites that promise an automatic check or decryption. Anyone who has your wallet dat can steal your funds if the password is weak.
How is the wallet dat encrypted?
When you set a password in Bitcoin Core, the private keys are encrypted with AES-256-CBC. The key for this is not derived directly from your password: the password goes through many rounds of SHA-512, at least 25,000 by default. Bitcoin Core adjusts the number of rounds to the computing power of the machine on which the password was set. This slows down attacks that try many passwords automatically.
For recovery, this means: a completely unknown, long and random password cannot be cracked with today’s technology. If you remember parts of it, typical patterns or the approximate length, the number of possibilities can often be narrowed down enough for a targeted search to succeed.
wallet dat recovery: the most common cases
1. File available, password known
This is the easiest case. Download Bitcoin Core only from bitcoincore.org, copy the file (work with a copy!) into the wallet directory and load it via “File” and “Open Wallet”. In current versions, older Berkeley DB wallets must first be converted via “Migrate Wallet”. The wallet then has to synchronise with the blockchain before the balance is shown. Alternatively, a node that is already synchronised can be used.
2. Password forgotten
Everything depends on what you still remember: parts of the password, typical patterns, spellings or the approximate length. A targeted search is built from these memories and automatically tests a very large number of variants. The more precise your information, the higher the chance. Beware of programs from forums, videos or Telegram groups that promise to crack a wallet.dat: in this area many tools are rigged with malware that forwards your file and your input to scammers.
3. File damaged
Damage is often caused by crashes, power failures or faulty storage media, especially with older Berkeley DB files. Often the private keys are still contained in the file and can be rescued. However, every repair attempt on the original can make the damage worse. So do not keep opening the file in Bitcoin Core and do not run repair programs on the original.
4. File deleted or hard drive faulty
Switch off the computer immediately and do not write anything else to the drive, because every write operation can overwrite deleted data. Do not install data recovery programs on the same drive either. The safest approach is to create a complete image of the drive first and work only with that image. The wallet file can often still be reconstructed from this image. In case of mechanical defects, the hard drive belongs in a data recovery lab.
Password forgotten, file damaged or deleted? Before you try anything yourself, describe your case to me. The initial assessment is free and you only pay if the recovery is successful. Have your case checked for free
Work safely: how to protect your keys
- Always work with copies. Keep the original unchanged and stored safely.
- No unknown programs. Use only Bitcoin Core from the official website and no “recovery tools” from forums, videos or Telegram groups.
- Upload nothing, send nothing. Never pass on your wallet dat, your password or extracted keys to strangers.
- No remote access for strangers. Do not install TeamViewer, AnyDesk or similar programs for anyone.
- Move the funds after recovery. Once an old file has been opened or keys have been extracted, it makes sense to transfer the funds to a new, securely backed-up wallet.
Beware: scams with purchased wallet dat files
Marketplaces and forums sell supposed wallet dat files with large Bitcoin balances whose password has allegedly been forgotten. This is a well-known scam. The files are manipulated, the funds are long gone, or the file or the bundled “tool” contains malware. Never buy other people’s wallet files. Learn more in our guide to the 10 most common crypto scams.
What is a wallet file? wallet dat and other formats
A wallet file is the file in which wallet software stores your private keys, along with addresses, transaction data and settings, usually encrypted with a password. The coins themselves are never inside the file but on the blockchain. The file is your access to them.
Not every wallet file is called wallet.dat. Electrum, for example, stores wallets in its own folder, and the old MultiBit software used files with the extension .wallet or .key. How to rescue such a wallet is explained in our article on MultiBit wallet recovery. For a general overview, see our guide to wallet recovery.
Ethereum wallets such as Geth or MyEtherWallet use so-called keystore files in JSON format whose file name starts with UTC--. Browser and mobile wallets such as MetaMask store the keys encrypted in the browser’s or app’s storage, while hardware wallets keep them on the device. For these wallets, the seed phrase is the actual backup.
For the future: backups and hardware wallets
Back up your wallet with the “Backup Wallet” function in Bitcoin Core (command backupwallet). According to the documentation, simply copying the file while the program is running can result in a corrupted copy. Keep the password separately and safely.
If you do not want to keep your coins on a PC permanently, you can switch to a hardware wallet. There, the funds are secured with a seed phrase instead of a file. Our hardware wallet comparison helps you choose the right device.
Professional help with wallet dat recovery
If you do not want to carry out the steps yourself or get stuck, I can help. I am Ing. Thomas Jochen Wagner, MBA, and with Crypto Recovery I offer technical crypto recovery: forgotten wallet passwords, damaged wallet files, faulty seed phrases and crypto sent on the wrong network.
- Free initial assessment of your case.
- Your data stays with you: Recovery usually takes place via Zoom. You carry out the steps yourself on your own device under my guidance, or in person at my office in Perg, Upper Austria.
- Payment only on success: a flat fee of 100 euros if the recovered value is below 1,000 US dollars, otherwise 10 % of the recovered value. No advance payment.
How the process works and how your data stays protected is described on the Security & Process page. I cannot help with fraud, phishing or hacking. In that case, please contact the police. Have your case checked for free now.
Frequently asked questions about the wallet dat
What is a wallet file?
A wallet file stores the private keys of a software wallet along with addresses, transaction data and settings. Examples are the Bitcoin Core wallet dat, Electrum wallet files or Ethereum keystore files. The coins are on the blockchain. Whoever has the file and, if set, its password can control them.
Can I import a wallet dat into Electrum or another wallet?
Not directly. The wallet dat can only be read by Bitcoin Core or the respective client. You can open the wallet in Bitcoin Core and send the funds to a new wallet with a transaction, or export the keys and import them there.
Are my bitcoins gone if I have lost the wallet dat?
The coins remain on the blockchain, but without the private keys they cannot be accessed. If there is no copy of the file and no seed phrase, access can only be regained through data recovery from the old storage medium.
What happens if I have completely forgotten the wallet dat password?
With a long, random password and no memory of it at all, recovery is not possible with today’s technology because the encryption is secure. If you remember parts, patterns or the length, a targeted search is often successful.
Can I recover a deleted wallet dat?
Often yes, as long as the storage area has not been overwritten. Switch off the computer immediately, create an image of the drive and have the file reconstructed from this image.
Can I open an old wallet dat in the current Bitcoin Core version?
Yes, but from Bitcoin Core 30 old Berkeley DB wallets must first be migrated to the new descriptor format. Use the menu item “Migrate Wallet” or the migratewallet command. Always work with a copy.
Sources: Bitcoin Core: file system documentation, release notes 28.0, release notes 30.0.


