Skip to main content
btcrecover.py is the main password and passphrase recovery script. It accepts a wallet file (or data extract) and a source of password candidates, then searches for the correct password. Minimum invocation:
python btcrecover.py --wallet <FILE> --passwordlist <FILE>
# or
python btcrecover.py --wallet <FILE> --tokenlist <FILE>
FlagArgumentDescription
--walletFILEThe wallet file to recover. Required unless --data-extract, --bip39, --slip39, --brainwallet, --rawprivatekey, or --bip38-enc-privkey is used.
--data-extractPrompt for data extracted by one of the extract-* scripts instead of using a wallet file. Allows secure recovery on untrusted hardware.
--data-extract-stringSTRINGPass the extracted data directly as a command-line argument instead of being prompted.
--android-pinSearch for the spending PIN instead of the backup password in a Bitcoin Wallet for Android/BlackBerry.
--blockchain-secondpassSearch for the second password in a Blockchain.com wallet instead of the main password.
--blockchain-correct-mainpassSTRINGSupply (or be prompted for) the main password when recovering the second password from a Blockchain.com wallet.
--msigna-keychainNAMEKeychain whose password to search for in an mSIGNA vault.
Example — wallet file
python btcrecover.py --wallet ./wallet.dat --passwordlist ./passwordlist.txt
Example — data extract (offline/untrusted hardware)
python btcrecover.py --data-extract --passwordlist ./passwordlist.txt
Exactly one of --tokenlist or --passwordlist must be supplied (unless using --correct-wallet-password).
FlagArgumentDescription
--tokenlistFILEFile of tokens / partial passwords. BTCRecover assembles full candidates by combining tokens. Supports wildcards and positional anchors.
--passwordlistFILE or -File of complete passwords, one per line. Use - to read from stdin.
--has-wildcardsParse and expand wildcards inside a --passwordlist (wildcards are only expanded in tokenlists by default).
--passwordlist-argumentsAllow the first line of the passwordlist file to start with #-- and supply additional CLI options.
--exclude-passwordlistFILE or -Never try passwords read from this file.
--max-tokensCOUNTMaximum number of tokens combined per guess.
--min-tokensCOUNTMinimum number of tokens combined per guess (default: 1).
--keep-tokens-orderDo not permute token order; combine tokens in the order they appear in the file.
--seedgeneratorUse tokenlist as a seed word list (for BIP39 seed descrambling).
--mnemonic-lengthCOUNTExpected word count of the seed (for seedgenerator mode).
--correct-wallet-passwordSTRINGSupply the known correct password directly (skips the search; useful for dumping wallet keys).
--correct-wallet-secondpasswordSTRINGSupply the correct second password directly.
--wildcard-custom-list-eFILECustom word list for the %e wildcard.
--wildcard-custom-list-fFILECustom word list for the %f wildcard.
--wildcard-custom-list-jFILECustom word list for the %j wildcard.
--wildcard-custom-list-kFILECustom word list for the %k wildcard.
--listpassPrint all password combinations that would be tried, then exit (does not attempt recovery).
Example — tokenlist
python btcrecover.py --wallet wallet.dat --tokenlist ./tokens.txt
Example — passwordlist from stdin
cat passwords.txt | python btcrecover.py --wallet wallet.dat --passwordlist -
Typo flags tell BTCRecover to also test near-misses of each password candidate. You must specify --typos COUNT to enable typo simulation, then choose one or more typo types.
FlagArgumentDescription
--typosCOUNTSimulate up to this many typos per guess. Required to activate any typo type.
--min-typosCOUNTEnforce a minimum number of typos per guess.
--typos-capslockTry the password with Caps Lock turned on.
--typos-swapSwap two adjacent characters.
--typos-repeatAdd a repeated character.
--typos-deleteDelete a character.
--typos-caseChange the case of a character.
--typos-closecaseChange the case of a character that is adjacent to another changed-case character.
--typos-replaceWILDCARDReplace a character with one from a wildcard set.
--typos-insertWILDCARD-STRINGInsert a string or wildcard at a position.
--typos-extra-wordAdd one extra word (for BIP39 passphrase).
--max-typos-<type>COUNTLimit the number of a specific typo type per guess (e.g., --max-typos-delete 1).
--max-adjacent-insertsCOUNTMaximum number of --typos-insert strings that can be inserted between a single pair of characters (default: 1).
--custom-wildSTRINGCustom character set for the %c wildcard.
--regex-onlyREGEXOnly try passwords matching this regular expression.
--regex-neverREGEXNever try passwords matching this regular expression.
--length-minCOUNTSkip passwords shorter than this length.
--length-maxCOUNTSkip passwords longer than this length.
--truncate-lengthCOUNTTruncate passwords to this length before testing (useful for Trezor passphrase limits, etc.).
--delimiterSTRINGDelimiter between tokens in the tokenlist or columns in a typos-map (default: whitespace).
--password-repeats-pretyposAlso test multiple repetitions of each candidate password before applying typos (e.g., passwordpassword).
--password-repeats-posttyposAlso test multiple repetitions after applying typos.
--max-password-repeatsCOUNTMaximum number of additional repetitions to produce (default: 2).
Example — single character deletion or swap
python btcrecover.py --wallet wallet.dat --tokenlist tokens.txt \
  --typos 2 --typos-delete --typos-swap
Use these flags when recovering a BIP39 “25th word” passphrase or a SLIP39 passphrase, rather than a wallet file password.
FlagArgumentDescription
--bip39Search for a BIP39 passphrase (no wallet file required).
--slip39Search for a SLIP39 passphrase.
--slip39-sharesMNEMONIC [MNEMONIC ...]One or more SLIP39 share mnemonics.
--mnemonicMNEMONICYour best guess of the mnemonic. Prompted interactively if omitted.
--mnemonic-promptPrompt for the mnemonic via the terminal instead of the GUI.
--skip-mnemonic-checksumSkip BIP39 mnemonic checksum validation.
--wallet-typeTYPECoin/wallet type (e.g., ethereum, litecoin, cardano). Default: bitcoin.
--addrsADDRESS [...]One or more known addresses in the wallet to verify against.
--addr-limitCOUNTNumber of addresses to generate and check per derivation path.
--mpkXPUBMaster public key (xpub/ypub/zpub) instead of individual addresses.
--addressdbFILEPath to an address database file (alternative to --addrs).
--bip32-pathPATH [PATH ...]One or more BIP32 derivation paths. Default: BIP44, BIP49, and BIP84 account 0.
--substrate-pathPATH [PATH ...]Substrate derivation path(s) for Polkadot (e.g., //hard/soft).
--languageLANG-CODEBIP39 wordlist language (default: auto-detected).
--force-p2shForce checking P2SH SegWit addresses on all derivation paths.
--force-p2trForce checking Taproot (P2TR) addresses on all derivation paths.
--force-bip44Force checking BIP44 legacy addresses regardless of supplied address type.
--force-bip84Force checking BIP84 native SegWit addresses regardless of supplied address type.
--disable-p2shDisable P2SH SegWit address checking.
--disable-p2trDisable Taproot address checking.
--disable-bip44Disable BIP44 legacy address checking.
--disable-bip84Disable BIP84 native SegWit checking.
--checksinglexpubaddressCheck non-standard single-address wallets (e.g., Atomic Wallet, MyBitcoinWallet).
Example — Bitcoin BIP39 passphrase
python btcrecover.py --bip39 \
  --addrs 1AmugMgC6pBbJGYuYmuRrEpQVB9BBMvCCn \
  --addr-limit 10 \
  --passwordlist ./docs/Usage_Examples/common_passwordlist.txt \
  --mnemonic "certain come keen collect slab gauge photo inside mechanic deny leader drop"
FlagArgumentDescription
--brainwalletSearch for a SHA256(passphrase) brainwallet key.
--rawprivatekeySearch for a raw private key with missing/damaged characters.
--warpwalletTreat the brainwallet as a Warpwallet or Memwallet (scrypt-based).
--warpwallet-saltSTRINGSalt for Warpwallet (typically your email address).
--memwallet-coinSTRINGCoin type for Memwallet brainwallets (bitcoin or litecoin).
--bip38-enc-privkeyENC-PRIVKEYBIP38-encrypted private key to recover.
--bip38-currencyCOINCurrency for the BIP38 key (e.g., bitcoin, litecoin, dash). Default: bitcoin.
--skip-compressedSkip compressed key variants.
--skip-uncompressedSkip uncompressed key variants.
--force-check-p2shForce checking P2SH SegWit addresses (needed for some altcoin brainwallets).
FlagArgumentDescription
--threadsCOUNTNumber of worker threads (default: number of logical CPU cores).
--workerID/TOTALDivide workload across multiple machines. Each machine runs with a unique ID. Example: --worker 1/3. You can assign multiple slices: --worker 1,2/3.
--skipCOUNTSkip this many initial passwords (to continue an interrupted search without autosave).
--max-etaHOURSRefuse to start if estimated completion time exceeds this value (default: 168 hours / 1 week).
--no-etaDisable ETA calculation (skips the initial counting phase).
--no-dupchecks / -dDisable duplicate password checking to save memory. Specify multiple times for additional effect (up to 4×).
--no-progressDisable the progress bar.
--utf8Enable Unicode mode; all input must be UTF-8 encoded.
--performanceRun a continuous performance benchmark (Ctrl-C to exit).
If BTCRecover hangs at “Counting passwords…”, run with --no-dupchecks. For very large search spaces also add --no-eta. See the FAQ for more detail.
Example — multi-machine split
# Machine 1 of 3
python btcrecover.py --wallet wallet.dat --tokenlist tokens.txt --worker 1/3

# Machine 2 of 3
python btcrecover.py --wallet wallet.dat --tokenlist tokens.txt --worker 2/3

# Machine 3 of 3
python btcrecover.py --wallet wallet.dat --tokenlist tokens.txt --worker 3/3
GPU acceleration is supported for: Bitcoin Core wallets, Blockchain.com (main and second password), Electrum passwords, BIP39 seeds, and Electrum seeds.
FlagArgumentDescription
--enable-openclEnable OpenCL-based GPU acceleration.
--opencl-infoList available GPU platform and device names, then exit.
--opencl-platformID [ID ...]Choose the OpenCL platform(s) to use (default: auto).
--opencl-devicesID1,ID2,...Comma-separated list of device IDs within the chosen platform (default: all).
--opencl-workgroup-sizeCOUNT [COUNT ...]Batch size for OpenCL work groups.
--enable-gpuEnable legacy OpenCL GPU acceleration (Bitcoin Core only).
--global-wsCOUNT [COUNT ...]OpenCL global work size for --enable-gpu (default: 4096).
--local-wsCOUNT [COUNT ...]OpenCL local work size; must evenly divide --global-ws (default: auto).
--gpu-namesNAME-OR-ID [...]Choose specific GPU(s) on multi-GPU systems.
--list-gpusList available GPU names and IDs (for --enable-gpu), then exit.
--int-rateRATEInterrupt rate for --enable-gpu; raise to improve PC responsiveness at the cost of speed (default: 200).
Example — list available OpenCL devices
python btcrecover.py --opencl-info
Example — GPU-accelerated BIP39 seed recovery
python btcrecover.py --bip39 \
  --addrs 1AmugMgC6pBbJGYuYmuRrEpQVB9BBMvCCn \
  --mnemonic "certain come keen collect slab gauge photo inside mechanic deny leader drop" \
  --tokenlist ./tokens.txt \
  --enable-opencl
FlagArgumentDescription
--autosaveFILESave progress every 5 minutes to this file. If the file already exists, progress is restored from it.
--restoreFILERestore progress and all options from an autosave file. Must be the only argument on the command line.
Example
# Start a long recovery with autosave
python btcrecover.py --wallet wallet.dat --tokenlist tokens.txt --autosave ./recovery.sav

# Resume after interruption
python btcrecover.py --restore ./recovery.sav
FlagArgumentDescription
--dump-walletFILEAfter a successful recovery, dump the decrypted wallet to this file.
--dump-privkeysFILEDump a list of private keys (Electrum-importable format) to this file.
--possible-passwords-fileFILEFile to save “close match” candidates to (default: possible_passwords.log).
--disable-save-possible-passwordsDisable saving close-match candidates.
--listpassList all password combinations to try, then exit without searching.
--pausePause before exiting (useful on Windows to read the output).
--no-progressDisable the progress bar display.
--version / -vShow full version information and exit.
--disablesecuritywarnings / --dswDisable security warning messages.
--beep-on-findPlay an audible alert when the password is found.

Build docs developers (and LLMs) love