Bitcoin Cash Address Converter: CashAddr ↔ Legacy

Paste a BCH address in either spelling and get the other one, with the address type, network and underlying hash. The checksum is verified first, so a mistyped address is rejected instead of converted.

Accepts CashAddr with or without the bitcoincash: prefix (q… or p…), bchtest: testnet addresses, and legacy Base58Check 1… / 3… addresses.

Checked in your browser with JavaScript. Addresses are never uploaded or stored.

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

  1. 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).
  2. 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.
  3. 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.
  4. 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

FormExampleChecksumDistinguishable from BTC?
Legacy P2PKH1…, 26–35 chars4 bytes double-SHA-256no
Legacy P2SH3…, 34 chars4 bytes double-SHA-256no
CashAddr P2PKHbitcoincash:q…, 42 chars after the prefix40-bit polymodyes
CashAddr P2SHbitcoincash:p…, 42 chars40-bit polymodyes
CashAddr P2SH-32bitcoincash:p…, 62 chars40-bit polymodyes, no legacy form
Testnetbchtest:q… or m… / n… / 2…sameprefix 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

For Bitcoin itself use the Bitcoin address validator; for generic bech32 strings the bech32 encoder / decoder.

Frequently asked questions

What is the difference between CashAddr and legacy Bitcoin Cash addresses?

Both encode the same 20-byte hash. Legacy addresses use Bitcoin's Base58Check (1… for P2PKH, 3… for P2SH) and look identical to Bitcoin addresses. CashAddr, introduced in January 2018, uses a bech32-style alphabet with a bitcoincash: prefix and a 40-bit checksum, so a BCH address can no longer be confused with a BTC address.

Is a legacy 1… address Bitcoin or Bitcoin Cash?

It can be either. The format is byte-for-byte the same on both chains, which is exactly why CashAddr was created. If an exchange gives you a 1… address for BCH, converting it to bitcoincash:q… is safe; but do not assume a 1… address you found elsewhere is a BCH address. The converter shows a warning for every legacy input.

Why does the converter reject my address?

Either the CashAddr polymod checksum or the Base58Check double-SHA-256 checksum failed, which means at least one character is wrong or missing. Mixed-case CashAddr strings are also invalid: the spec requires all lowercase or all uppercase.

Can I drop the bitcoincash: prefix?

Yes. The prefix is part of the checksum but most wallets accept the bare q… or p… string and assume mainnet. The tool tries bitcoincash, bchtest and bchreg when no prefix is given and tells you which one matched.

What are P2SH-32 addresses?

Since the 2023 CashTokens upgrade, Bitcoin Cash supports 32-byte script hashes (type bits 1, size bits 3). They are valid CashAddr strings that start with p… but are longer, and they have no legacy Base58 form. The decoder shows the hash and explains why no legacy form is offered.

Does this work for Bitcoin SV or eCash?

No. eCash (XEC) uses the same CashAddr algorithm with the ecash: prefix, and Bitcoin SV keeps legacy addresses. If you paste a CashAddr with another prefix, the checksum is verified against that prefix but it is flagged as a non-standard Bitcoin Cash prefix.