Skip to main content
Extract scripts let you separate the wallet file from the password recovery process. Instead of copying your full wallet to another machine (or to someone helping you), you run a short script on your own computer that extracts only a small piece of encrypted data — just enough for BTCRecover to test passwords against, but not enough to reconstruct your private keys or access your funds.

Why use extract scripts?

Use faster hardware

Run the recovery on a cloud VM or a machine with a better CPU or GPU without exposing your wallet file.

Get help safely

Let someone else configure and run BTCRecover for you. They only ever see a base64 string, not your wallet.

Reduce trust required

Even if BTCRecover itself had a bug or malicious code, it cannot access your funds with only the extract output.

Short, auditable scripts

Each extract script is intentionally short and easy to read, making it straightforward to verify what data is being exported.
Extract scripts never extract enough information to reconstruct private keys or access funds, even after a successful password recovery. The recovered password alone, without the rest of the wallet file, is not sufficient to spend bitcoin.

General workflow

1

Download the extract script

Download the extract script for your wallet type from the BTCRecover repository. Save it to the same folder as a copy of your wallet file.
2

Copy your wallet file

Make a copy of your wallet file into the same folder as the extract script. Never use your original wallet file directly.
3

Run the extract script

Run the script to generate a short base64 string. This string contains only the encrypted fragment needed for password checking.
python3 extract-<wallet-type>.py <wallet-file>
4

Transfer the base64 string

Copy the base64 output and transfer it to the machine that will run BTCRecover. You do not need to transfer your wallet file.
5

Run BTCRecover with --data-extract

On the recovery machine, run BTCRecover with --data-extract instead of --wallet. When prompted, paste the base64 string.
python3 btcrecover.py --data-extract --tokenlist tokens.txt
# > [paste base64 string here]

Wallet-specific instructions

Wallet file location (Windows): %appdata%\Bitcoin\wallet.datExtract script: extract-scripts/extract-bitcoincore-mkey.py
cd btcrecover-master/extract-scripts
python3 extract-bitcoincore-mkey.py wallet.dat
Example output:
Bitcoin Core encrypted master key, salt, iter_count, and crc in base64:
lV/wGO5oAUM42KTfq5s3egX3Uhk6gc5gEf1R3TppgzWNW7NGZQF5t5U3Ik0qYs5/dprb+ifLDHuGNQIA+8oRWA==
Run recovery:
cd btcrecover-master
python3 btcrecover.py --data-extract --tokenlist tokens.txt
# Please enter the data from the extract script
# > lV/wGO5oAUM42KTfq5s3egX3Uhk6gc5gEf1R3TppgzWNW7NGZQF5t5U3Ik0qYs5/dprb+ifLDHuGNQIA+8oRWA==
What is extracted: The encrypted master key (mkey), its salt, and iteration count. The mkey is needed to test passwords but contains no address or private key information. Even if the password is found, the decrypted mkey is useless without the rest of the wallet file.
If you have a pywallet dump file instead of wallet.dat, use extract-bitcoincore-mkey-from-pywallet.py instead.

All available extract scripts

WalletScript
Bitcoin Coreextract-bitcoincore-mkey.py
Bitcoin Core (pywallet dump)extract-bitcoincore-mkey-from-pywallet.py
Bitherextract-bither-partkey.py
Blockchain.com (main password)extract-blockchain-main-data.py
Blockchain.com (second password)extract-blockchain-second-hash.py
Coinomiextract-coinomi-privkey.py
Dogechain.infoextract-dogechain-privkey.py
Electrum 1.xextract-electrum-halfseed.py
Electrum 2.xextract-electrum2-partmpk.py
Metamask (vaults)extract-metamask-vaults.py
Metamask (private key)extract-metamask-privkey.py
mSIGNAextract-msigna-partmpk.py
MultiBit Classicextract-multibit-privkey.py
MultiBit HDextract-multibit-hd-data.py
You can download individual extract scripts directly from the BTCRecover GitHub repository if you don’t want to download the entire package.

Build docs developers (and LLMs) love