tokens.txt) is a text file containing fragments — called tokens — that you remember from your password, even if you don’t remember their exact order or position. BTCRecover combines these tokens in different ways to generate full password guesses.
If your password contains non-ASCII (non-English) characters, add the
--utf8 flag to enable Unicode support.Basics
Create a plain text file with one token per line. BTCRecover will try all possible combinations using one or more of the listed tokens:tokens.txt
Hotel_california, BeetlejuiceCairo, CairoHotel_californiaBeetlejuice, and so on.
Lines beginning with # at the very start are treated as comments and ignored:
tokens.txt
Token features
Mutual exclusion (tokens on the same line)
Mutual exclusion (tokens on the same line)
Tokens placed on the same line, separated by spaces, are mutually exclusive — they will never appear together in a single password guess. Use this when you’re unsure about the exact spelling or capitalization of a fragment:BTCRecover will try
tokens.txt
Cairo and BeetlejuiceCairoHotel_california, but will skip Betelgeusebetelgeuse since those two variants are on the same line.This can dramatically reduce the search space. In this example, all four spelling variants on one line produces 48 combinations instead of 1,956 if each were on its own line.Required tokens (+)
Required tokens (+)
Prefix a line with Every generated password will include Here, exactly one token from the second line is required in every guess. Tokens on the same line are still mutually exclusive. This configuration produces 244 combinations instead of 9,864,100 if all tokens were on separate lines.
+ (followed by a space) to mark one of its tokens as required in every password guess:tokens.txt
Cairo. You can combine required tokens with mutual exclusion:tokens.txt
Beginning and ending anchors (^ and $)
Beginning and ending anchors (^ and $)
Use This requires either
^ at the start of a token to force it to appear only at the beginning of a password. Use $ at the end of a token to force it to appear only at the end:tokens.txt
Cairo, if included, is only tried at the beginning. Hotel_california, if included, is only tried at the end. Neither is required.You can combine anchoring with required tokens:tokens.txt
Hotel_california or hotel_california at the beginning of every password.Positional anchors (^N^)
Positional anchors (^N^)
A positional anchor forces a token to appear at a specific position in the password (counted by number of preceding tokens):
tokens.txt
Second_or_bust is only tried as the second token; Third_or_bust is only tried as the third. Neither is required (no +).Middle anchors (^N,M^)
Middle anchors (^N,M^)
A middle anchor restricts a token to appear within a range of positions, and it is never tried as the first or last token:You can omit either number in the range:To allow a middle-anchored token to also appear at the beginning or end, add a second copy on the same line with an appropriate anchor:
tokens.txt
tokens.txt
tokens.txt
Relative anchors (^rN^)
Relative anchors (^rN^)
Relative anchors control the ordering of tokens relative to each other without fixing their absolute position:When two or more relative-anchored tokens appear together, they appear in their specified order.
tokens.txt
Earlier Anywhere Later would be tried, but Later Earlier would not. Tokens with equal relative values (like Middlish_A and Middlish_B) can appear in either order relative to each other.A single token cannot have both a positional and a relative anchor.
Token count limits (--max-tokens, --min-tokens)
Token count limits (--max-tokens, --min-tokens)
Use With
--max-tokens to cap the number of tokens combined into a single guess. Use --min-tokens to skip combinations already tried in a previous run:--max-tokens 2, a guess made from three tokens is skipped. This is useful when you have a large token file and need to keep the search manageable.Wildcards
Wildcards expand a single placeholder into many possible characters, letting you express uncertainty within a token without listing every variant explicitly.Common wildcards
| Wildcard | Expands to |
|---|---|
%d | A single digit (0–9) |
%2d | Exactly 2 digits |
%1,3d | Between 1 and 3 digits |
%a | A single lowercase ASCII letter |
%A | A single uppercase ASCII letter |
%n | A single digit or lowercase letter |
%N | A single digit or uppercase letter |
%ia | A single lower or uppercase letter (case-insensitive) |
%s | A single space |
%t | A single tab |
%y | Any single ASCII symbol |
%p | Any single ASCII letter, digit, or symbol |
%q | Any letter, digit, symbol, or space (common BIP39 passphrase set) |
%H | A single hexadecimal character (0-9, A-F) |
%B | A single Base58 character |
%[chars] | Exactly one of the listed characters |
%1,3[chars] | Between 1 and 3 of the listed characters |
%[0-9a-f] | Exactly one hex digit |
%% | A literal % |
%^ | A literal ^ |
%S | A literal $ |
Cairo is followed by a single digit:
tokens.txt
Cairo0 Cairo1 Cairo2 ... Cairo9 on a single line.
Custom character sets
Use--custom-wild characters to define a custom set, then reference it with %c (or %C for uppercase, %ic for case-insensitive):
Expanding wildcards with ranges
Add a length range between% and the wildcard letter to expand to multiple characters:
Backreference wildcards
Backreference wildcards (%b) copy one or more characters that appear earlier in the password. They are useful for passwords with repeating patterns:
Contracting wildcards
Contracting wildcards remove characters from a guess, useful for modeling copy-paste truncation errors:| Wildcard | Behavior |
|---|---|
%0,5- | Removes 0–5 adjacent characters from either side |
%0,5< | Removes 0–5 characters from the left only |
%0,5> | Removes 0–5 characters from the right only |
Special symbols reference
| Symbol | Special when… |
|---|---|
% | Always special; use %% for a literal % |
^ | At the start of a token; use %^ for a literal ^ |
$ | At the end of a token; use %S for a literal $ |
# | At the very start of a line (comment); use a leading space to avoid |
+ | First character on a line followed by a space (required token marker) |
Embedding command-line options
You can place command-line options directly in the token file. The first line must begin with#--:
tokens.txt