Match Crypto Wallet Addresses

The following information is provided on how to properly check the wallet address entered in the withdrawal form. In order to avoid receiving failed withdrawal requests, the merchant should check the wallet format of the selected currency. For example, you specified a Tron wallet address in the field, but the currency you selected for withdrawal is from the BNB chain network.

The following regular expressions are crafted to match some commonly used cryptocurrency wallet address types. This page details the Regex components and pattern tests to match Ethereum, Bitcoin, Dash, Tron, Dogecoin, Litecoin and Solana addresses.

Regular Expressions

Ethereum (ETH)

/^0x[a-fA-F0-9]{40}$/g

Bitcoin (BTC)

/^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/g
/^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$/g

Bitcoin Cash (BCH)

/^((bitcoincash:)?(q|p)[a-z0-9]{41})

Dash (DASH)

/X[1-9A-HJ-NP-Za-km-z]{33}$/g

Tron (TRX)

/T[A-Za-z1-9]{33}

Dogecoin (DOGE)

/^D{1}[5-9A-HJ-NP-U]{1}[1-9A-HJ-NP-Za-km-z]{32}$

Litecoin (LTC)

/^([LM3]{1}[a-km-zA-HJ-NP-Z1-9]{26,33}||ltc1[a-z0-9]{39,59})$/g

Ripple (XRP)

/^r[1-9A-HJ-NP-Za-km-z]{25,34}$

Solana (SOL)

/^[1-9A-HJ-NP-Za-km-z]{32,44}$

The Open Network (TON)

/^(EQ|UQ)[A-Za-z0-9_-]{46}$

Regex Components

Anchors

Quantifiers

OR Operator

Character Classes

Ethereum (ETH):

Bitcoin (BTC):

Dash (DASH):

Tron (TRX):

Dogecoin (DOGE):

Litecoin (LTC):

Solana (SOL):

Flags

Grouping and Capturing

Last updated