How to use Vanitygen to generate custom addresses for different cryptocurrencies

Instead of having a Bitcoin address with random characters, Vanitygen allows you to generate addresses that contain meaningful strings. It does this by searching through thousands of random addresses every second and finding the ones that match your query. Longer strings require more processing power and take more time to find however so it’s useful to have a computer with beefy specs.

I use Vanitygen to generate cold storage paper wallets on an offline computer. Most people who have been in the Bitcoin community for a long time are probably quite familiar with Vanitygen. If you see an address that has a recognizable word in it, then chances are it was generated using Vanitygen or one of its forks. But did you know that Vanitygen can be used to generate vanity addresses for other cryptocurrencies too?

By default, Vanitygen will generate Bitcoin addresses that start with “1”. However, the program can be used to generate vanity addresses for coins whose addresses start with other characters by using the -X option followed by a decimal version number.

The following table provides examples of command line calls for Bitcoin and some popular (and not so popular) altcoins (the decimal version numbers are highlighted in bold):

CoinCommand line call
Bitcoin, Devcoin, Freicoin, Terracoin$ ./vanitygen -X 0 1 or $ ./vanitygen 1
Bitcoin (multi-signature)$ ./vanitygen -X 5 3
Novacoin$ ./vanitygen -X 8 4
Feathercoin$ ./vanitygen -X 14 6 or $ ./vanitygen -X 14 7
Anoncoin$ ./vanitygen -X 23 A
CHNCoin$ ./vanitygen -X 28 C
Digitalcoin, Dogecoin$ ./vanitygen -X 30 D
Franko$ ./vanitygen -X 35 F
Pesetacoin$ ./vanitygen -X 47 K or $ ./vanitygen -X 47 L
Litecoin$ ./vanitygen -X 48 L
Namecoin$ ./vanitygen -X 52 M or $ ./vanitygen -X 52 N
Peercoin$ ./vanitygen -X 55 P
Gridcoin$ ./vanitygen -X 62 R or $ ./vanitygen -X 62 S
Yacoin$ ./vanitygen -X 77 X or $ ./vanitygen -X 77 Y
BBQCoin$ ./vanitygen -X 85 b
Bitcoin (testnet)$ ./vanitygen -X 111 m or $ ./vanitygen -X 111 n
Ixcoin$ ./vanitygen -X 138 x

Some coins like Namecoin can start with two different letters (either “M” or “N”) while others like Litecoin can only start with one letter (“L”). For example, the following command line calls will generate Namecoin addresses starting with “NBoat” and “MyName” respectively:

$ ./vanitygen -X 52 NBoat
$ ./vanitygen -X 52 MyName

Some coins have other restrictions on letters. For example, BTC addresses can’t include the letters “l” (lowercase), “I”, and “O” (uppercase), LTC addresses only start from “LK” and end at “Li”, and DGC addresses must start with an uppercase “D” followed by either a digit or an uppercase letter.

The following table shows the leading symbols and address lengths for 160-bit hashes for each of the possible decimal version values:

Decimal versionLeading symbolAddress length
01<35
1Q-Z or a-k or m-o33
2o-z or 233 or 34
3234
42 or 334
5, 6334
73 or 434
8434
94 or 534
10, 11534
125 or 634
13634
146 or 734
15, 16734
177 or 834
18834
198 or 934
20, 21934
229 or A34
23A34
24A or B34
25, 26B34
27B or C34
28C34
29C or D34
30, 31D34
32D or E34
33E34
34E or F34
35, 36F34
37F or G34
38G34
39G or H34
40, 41H34
42H or J34
43J34
44J or K34
45, 46K34
47K or L34
48L34
49L or M34
50, 51M34
52M or N34
53N34
54N or P34
55, 56P34
57P or Q34
58Q34
59Q or R34
60, 61R34
62R or S34
63S34
64S or T34
65, 66T34
67T or U34
68U34
69U or V34
70, 71V34
72V or W34
73W34
74W or X34
75, 76X34
77X or Y34
78Y34
79Y or Z34
80, 81Z34
82Z or a34
83a34
84a or b34
85b34
86b or c34
87, 88c34
89c or d34
90d34
91d or e34
92, 93e34
94e or f34
95f34
96f or g34
97, 98g34
99g or h34
100h34
101h or i34
102, 103i34
104i or j34
105j34
106j or k34
107, 108k34
109k or m34
110m34
111m or n34
112, 113n34
114n or o34
115o34
116o or p34
117, 118p34
119p or q34
120q34
121q or r34
122, 123r34
124r or s34
125s34
126s or t34
127, 128t34
129t or u34
130u34
131u or v34
132, 133v34
134v or w34
135w34
136w or x34
137, 138x34
139x or y34
140y34
141y or z34
142, 143z34
144z or 234 or 35
145-255235

In order to find out the version number of a particular cryptocurrency, you should first ensure that the encoding used for keys and addresses in that cryptocurrency is base 58. Then you need to convert an example address to decimal (base 10). There are plenty of converters that can do this and you can even write your own in a programming language like Perl or Python. Here is an example of an online converter.

Enter an example address such as DDogepartyxxxxxxxxxxxxxxxxxxw1dfzr (a Dogecoin address) in the top text box, select the “decimal” radio box, and then click on the “decrypt” button. The result of the conversion should be displayed on the left sidebar (click to expand):

As you can see, the first number “30” which I have highlighted is the version number that corresponds to the base 58 encoding used by Dogecoin addresses.

Alternatively, if you are comfortable with code then you can look through the coin’s source code for a file named “base58.h” in the “src” directory. At around line 280 on most coins, there should be an assignment statement for the constant PUBKEY_ADDRESS. Its value should be the version number you need.

Leave a Reply

Your email address will not be published. Required fields are marked *