Address
A bitcoin address is a 26-35 alphanumeric character identifier that is used to receive bitcoin. There are several address formats based on different specifications.
When users enter an address, these formats have specific prefixes, so it is possible to determine which format is being used.
Below are common address formats used today:
Taproot address - P2TR #
A pay-to-taproot (P2TR), also known as a Taproot or Bech32m address, is the most recent and advanced bitcoin address format. Taproot introduces more advanced security, privacy, flexibility and scaling to bitcoin. Like SegWit, Taproot addresses are opt-in and not currently widely supported. Taproot adoption can be tracked here.
Benefits of Taproot include the ability to use Schnorr Signatures, offering better security, lower fees, and more flexible multi-key transactions. Multi-key addresses using P2TR look the same as single-key addresses giving users of multi-key increased privacy. Taproot also enables more advanced scripting, enabling more complex smart contracts to be built on bitcoin.
Taproot addresses start with bc1p
and are case insensitive.
Example: bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297
SegWit address - P2WPKH #
A pay-to-witness-public-key-hash (P2WPKH), also known as native SegWit or Bech32 address, is a modern, more efficient address format. SegWit addresses are opt-in, so not every application supports them, but the majority do, and should, today. SegWit adoption can be tracked on here.
Benefits of SegWit addresses include more resistance to input errors (as they are case insensitive and use error-correcting codes), and lower transaction fees. The fee saving will depend on the type of transaction but for a common transfer of funds it can be 30-40%.
SegWit addresses start with bc1q
and are case insensitive.
Example: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
Script address - P2SH #
A pay-to-script-hash (P2SH), or script address, can have additional rules and functionality attached to the address. Script addresses are commonly used for multi-sig addresses, which can specify that signatures from several keys are required to authorize the transaction.
Script addresses start with the number 3, can contain upper and lowercase characters, and are case sensitive.
Example: 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy
Legacy address - P2PKH #
A pay-to-pubkey-hash (P2PKH), or legacy address, is the oldest and original bitcoin address format. This address format is not widely used today as transaction costs are higher using this format. However, support for this in applications is still encouraged to be compatible with older legacy wallets that have not upgraded to new address formats.
Legacy addresses begin with the number 1, can contain upper and lowercase characters, and are case sensitive.
Example: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2
Change address #
When the output of a transaction is used as the input of another transaction, it must be spent entirely. Sometimes the value of the output is higher than what the user wishes to pay. In this case, the bitcoin client generates a new bitcoin address, and sends the difference back to this address. This is known as change address. The change address format used will usually be the default format used by the wallet application.
Address compatibility #
Since “legacy” addresses are still in use, some older applications have yet to upgrade. Script addresses can be used to resolve incompatibility issues that can arise when the sender’s application does not recognize the SegWit address provided by the receiver.
To illustrate the problem, suppose the sender is using a legacy wallet and paying to the receiver’s SegWit address. In this case, the sender’s wallet may incorrectly warn them that the address is invalid or not supported. This can confuse the sender’s end, leading them to think that the receiver provided an incorrect address.
The receiver should then have the ability to switch to a Script or Taproot address that does not have all the benefits of SegWit, like cheaper transactions and more advanced features, but will be compatible with the sender’s wallet.
Visual formatting #
Handling addresses can be stressful when sending bitcoin. Transactions cannot be reversed, and sending to an incorrect address may mean loss of funds. While address formats are what they are, visual formatting can make it easier for users to compare addresses and ensure their accuracy.
Especially when addresses are displayed in a compacted way, make sure to offer a more easily readable alternative. Spacing, subtle coloration, and use of mono-space fonts help users identify chunks of the address to compare, and distinguish characters better.
Address validation #
Validation with visual feedback can reduce user anxiety about making mistakes. While addresses look like randomly assembled characters, there are patterns that can be used to identify whether an address is valid or not. For segwit and taproot addresses, it may be possible to identify which characters are incorrect. However, there are limits to this. Too many mistakes may result in an address that is valid but different from what the user intended to enter. You can try this interactive validator.
Address reuse #
Address reuse is the practice of receiving more than one transaction to a single bitcoin address. Although there are obvious usability benefits of reusing an address, this practice is not recommended due to the negative impact on privacy and security. Reusing an address makes it easier to correlate transactions with a particular user, thus hurting the pseudonymity of the user and thus the overall censorship resistance of the network. More on address reuse here.
Next, learn about the different kinds of wallets that exist with bitcoin.