Sub topic 2
Reading Address Formats: Bitcoin, Ethereum and Solana
Assume you know what a cryptocurrency and blockchain are, and that you have sent crypto from a wallet or exchange before. You should also be comfortable reading hexadecimal strings. This chapter focuses on recognizing address formats. Format clues help you catch mistakes, but they do not prove that a payment will reach the intended account.
An address is an encoded identifier
A wallet address is a short, shareable representation of a public key or, in some systems, a script that controls funds. A private key signs transactions. A public key is derived from the private key. An address is usually derived from the public key or from spending rules.
The address does not contain your coins. The blockchain records balances or transaction outputs associated with that address. Wallet software uses the private key to prove that it may spend them.
Common formats
| Network or system | Common appearance | Main format clue |
|---|---|---|
| Bitcoin legacy | `1A1zP1...` | Starts with `1`; Base58Check encoding |
| Bitcoin P2SH | `3J98t1...` | Starts with `3`; often used for script-based addresses |
| Bitcoin SegWit | `bc1q...` or `bc1p...` | Lowercase Bech32 or Bech32m format |
| Ethereum and many EVM chains | `0x529084...` | `0x` followed by 40 hexadecimal characters |
| Solana | `7dHbWX...` | Base58-encoded 32-byte public key |
Bitcoin addresses beginning with bc1 are mainnet addresses. A bc1q address commonly represents SegWit version 0, while bc1p commonly represents Taproot. Bitcoin testnet addresses often begin with tb1, m, n, or 2, so copying the prefix matters.
Ethereum addresses contain 20 bytes, represented as 40 hexadecimal characters after 0x. Hexadecimal uses 0–9 and a–f. An Ethereum address may be all lowercase, all uppercase, or mixed case. Mixed-case addresses can use the EIP-55 checksum, where capitalization helps detect typing errors. A checksum does not identify the asset or guarantee that the address belongs to the person you expect.
Solana addresses are Base58 strings derived from Ed25519 public keys. They do not start with 0x and usually contain 32 to 44 characters. Base58 avoids visually confusing characters such as zero and uppercase O. A Solana address is not interchangeable with an Ethereum address, even if both are displayed as letters and numbers.
Format checks are only filters
A format check can rule out some networks, but it often leaves several candidates. For example, an EVM address can be valid on Ethereum, Polygon, Base, Arbitrum, and many other EVM networks. The address text alone does not tell you which network to use.
import re
def classify(address: str) -> list[str]:
"""Return networks that could match the address format."""
candidates = []
if re.fullmatch(r"0x[0-9a-fA-F]{40}", address):
candidates.append("EVM-compatible network")
if address.startswith("bc1"):
candidates.append("Bitcoin mainnet, Bech32 or Bech32m")
if re.fullmatch(r"[13][1-9A-HJ-NP-Za-km-z]{25,34}", address):
candidates.append("Bitcoin mainnet, legacy or P2SH")
if re.fullmatch(r"[1-9A-HJ-NP-Za-km-z]{32,44}", address):
candidates.append("Possibly Solana")
return candidates
print(classify("0x52908400098527886E0F7030069857D2E4169EE7"))This program demonstrates a structural test, not a payment decision. It does not validate every checksum, identify the recipient, or confirm that a token is supported.
> callout warning > Never select a network only because its address format looks compatible. Confirm the network name in the receiving wallet or exchange, and confirm that the asset is supported there.
Exercise
An address begins with 0x and has 40 hexadecimal characters. Can you conclude that it is an Ethereum mainnet address?
Show answer
No. It is an EVM-style address and could be used on many EVM networks. Confirm the network separately.