Bitcoin address formats explained

Bitcoin addresses are a fundamental part of the Bitcoin network. They allow users to send and receive bitcoin securely. There are different types of Bitcoin address formats, each with its own features and use cases. Understanding these formats is essential for anyone involved in Bitcoin transactions. In this blog post, we'll explore the three main types of Bitcoin address formats: P2PKH, P2SH, and Bech32.

1. Pay-to-PubKey-Hash (P2PKH)

What is P2PKH?

P2PKH addresses are the most common and widely used Bitcoin address format. They are also known as "legacy" addresses.

Characteristics of P2PKH Addresses

  • Format: These addresses start with the number "1."

  • Example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

  • Compatibility: Supported by all Bitcoin wallets and services.

  • Usage: Suitable for most transactions, though they come with higher fees compared to newer formats.

How P2PKH Works

When you send bitcoin to a P2PKH address, you are actually sending it to the hash of a public key. To spend the bitcoin, the recipient must provide a digital signature generated from their private key, proving ownership of the corresponding public key.

2. Pay-to-Script-Hash (P2SH)

What is P2SH?

P2SH addresses provide greater flexibility by allowing complex transaction scripts. They are commonly used for multi-signature wallets and other advanced features.

Characteristics of P2SH Addresses

  • Format: These addresses start with the number "3."

  • Example: 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy

  • Compatibility: Supported by most Bitcoin wallets and services.

  • Usage: Ideal for multi-signature transactions and scripts requiring conditions to be met before spending.

How P2SH Works

P2SH transactions involve sending bitcoin to a script hash instead of a public key hash. The script hash can represent various conditions, such as requiring multiple signatures (multi-sig) or timelocks. To spend the bitcoin, the recipient must provide a script that matches the hash and fulfills the conditions.

3. Bech32 (P2WPKH and P2WSH)

What is Bech32?

Bech32 is a newer address format designed to be more efficient and reduce transaction fees. It supports Segregated Witness (SegWit), a protocol upgrade that enhances Bitcoin's scalability.

Characteristics of Bech32 Addresses

  • Format: These addresses start with "bc1."

  • Example: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf8yec

  • Compatibility: Supported by most modern wallets and services, but not universally accepted.

  • Usage: Recommended for users looking to save on transaction fees and improve network efficiency.

How Bech32 Works

Bech32 addresses come in two varieties: P2WPKH (Pay-to-Witness-PubKey-Hash) and P2WSH (Pay-to-Witness-Script-Hash). These addresses leverage SegWit to separate transaction signatures from the transaction data, allowing for more transactions per block and lower fees.

Conclusion

Bitcoin address formats have evolved to meet the growing needs of the network. While P2PKH addresses remain widely used, P2SH addresses offer greater flexibility, and Bech32 addresses provide enhanced efficiency and lower fees. Understanding these formats can help you choose the right type of address for your transactions, ensuring compatibility and cost-effectiveness.

 

Need help with bitcoin?

Get hands on guidance for securing your stack.

Next
Next

Sparrow Wallet: The best bitcoin wallet