Find the complete tutorial series of bitcoin technical concepts at https://bitcoindevs.xyz/decoding/roadmap
SegWit (Segregated Witness) addresses use Bech32 encoding (not the older Base58Check).
A typical Bech32 address might look like:
bc1qeaqk7vume5vmrdgx5eyveh5sch4ncg56jdmlkj
Decoding a Bech32 Address
Let’s decode this bech32 address to extract version, witness program and other data
Step 1: Extract the Version
After the
bc1
prefix, the next character encodes the witness version.Step 2: Extract the Witness Program
The remaining characters (after the version) form the witness program.

Step 3: Extract the Checksum
- The final part of the data includes the checksum.
- The checksum confirms the address has no typos or errors.
Step 4: Verify the Checksum
A valid checksum means the address is properly formatted.
Step 5: Convert the witness program (base32) into binary.
Final Step: Convert Binary to Witness Program**
Use the binary to derive the Public Key Hash (WPKH) or other script data.
Why Bech32?
- Lower Fees: SegWit reduces the size of transactions, lowering fees.
- Error Detection: The Bech32 format has built-in error correction.
- Future Compatibility: Supports newer SegWit versions.
Feel free to share these illustrations and notes to help others understand how to decode and verify a SegWit (Bech32) address!