Menu

What should I do if the wallet.dat file is corrupted

Release time:10-10-2026 11:23:59

What should I do if the wallet.dat file is corrupted

If your `wallet.dat` file is damaged or corrupted, you can often repair it using Bitcoin Core's built-in database recovery flags or by restoring from a recent backup. Because a damaged database can prevent your wallet from loading or reading your balances, follow these steps carefully.


1. **Close Bitcoin Core completely:** Prerequisite.

Ensure that the wallet software and any background daemons are fully shut down.


* **Verification:** Open Task Manager (`Ctrl + Shift + Esc`) and confirm that `bitcoin-qt.exe` or `bitcoind.exe` is not running.



2. **Create a safety copy of the damaged file:** Data Backup.

Navigate to your Bitcoin data directory (`%appdata%\Bitcoin` on Windows), copy the damaged `wallet.dat` file, and paste it into a separate folder as an emergency backup.


* **Verification:** Confirm success by verifying that the backup copy exists in your separate folder with the original file size.



3. **Run the salvage command:** Database Salvage.

Open Command Prompt, navigate to your Bitcoin installation directory, and start Bitcoin Core with the salvage flag by typing `bitcoin-qt -salvagewallet` (or `bitcoind -salvagewallet`) and pressing Enter.


* **Verification:** Confirm success by checking that the client launches and outputs a salvage report indicating it has attempted to recover keys from the database.