What is a Bitcoin Cash address converter?
A Bitcoin Cash address converter translates one BCH account between its two spellings: the CashAddr form bitcoincash:q… / p… defined in the CashAddr specification, and the legacy Base58Check form 1… / 3… inherited from Bitcoin. Both contain the same 160-bit hash of a public key (P2PKH) or script (P2SH); only the encoding and checksum differ.
How CashAddr encoding works
- Version byte. One byte whose upper bits hold the type (0 = P2PKH, 1 = P2SH) and whose lower three bits encode the hash size (0 = 160 bits, 3 = 256 bits).
- 5-bit regrouping. The version byte and the hash are concatenated and re-cut into 5-bit groups, padded with zero bits, exactly as bech32 does.
- Checksum. A 40-bit BCH code is computed over the expanded prefix (each character's lower 5 bits, then a zero), the payload and eight zero groups, using the generator constants 0x98f2bc8e61, 0x79b76d99e2, 0xf33e5fb3c4, 0xae2eabe2a8 and 0x1e4f43e470. The eight checksum groups are appended.
- Alphabet. Every group is written with the 32-character set
qpzry9x8gf2tvdw0s3jn54khce6mua7l, so the string never contains 1, b, i or o.
Worked example
The spec's first vector is 1BpEi6DfDAUFd7GtittLSdBeYJvcoaVggu. Base58Check decoding yields version 0x00 (P2PKH) and hash160 76a04053bda0a88bda5177b86a15c3b29f559873. Prepending the CashAddr version byte 0x00, regrouping into 5-bit values and appending the checksum gives bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a. The P2SH variant of the same hash starts with 3 in legacy form (3CWFddi6m4ndiGyKqzYvsFYagqDLPVMTzC) and with p in CashAddr (bitcoincash:ppm2qsznhks23z7629mms6s4cwef74vcwvn0h829pq). Paste any of them above to see the conversion live.
Formats at a glance
| Form | Example | Checksum | Distinguishable from BTC? |
|---|---|---|---|
| Legacy P2PKH | 1…, 26–35 chars | 4 bytes double-SHA-256 | no |
| Legacy P2SH | 3…, 34 chars | 4 bytes double-SHA-256 | no |
| CashAddr P2PKH | bitcoincash:q…, 42 chars after the prefix | 40-bit polymod | yes |
| CashAddr P2SH | bitcoincash:p…, 42 chars | 40-bit polymod | yes |
| CashAddr P2SH-32 | bitcoincash:p…, 62 chars | 40-bit polymod | yes, no legacy form |
| Testnet | bchtest:q… or m… / n… / 2… | same | prefix only |
Why the legacy warning matters
Exchanges still show legacy addresses for BCH deposits, and users still paste Bitcoin addresses into BCH withdrawal forms. Because the bytes are identical, a BCH transaction to a Bitcoin user's 1… address is valid and confirms on the Bitcoin Cash chain, where the recipient's wallet never looks. The coins are not destroyed, but only the holder of that private key can sweep them with a BCH wallet, and most recipients have no idea how. Converting every address to CashAddr before sending removes the ambiguity: a wallet that accepts bitcoincash: is a BCH wallet.
Typical uses
- Turning a legacy deposit address from an older exchange into the CashAddr form that modern wallets and the payment QR generator expect.
- Checking whether a
q…string pasted without its prefix is mainnet orbchtest. - Extracting the hash160 to build or verify a script, or to compare two spellings of the same address.
For Bitcoin itself use the Bitcoin address validator; for generic bech32 strings the bech32 encoder / decoder.