---
title: "Address Encoding — definition | Nuri Glossary"
description: "How address bytes become readable strings: Base58Check for legacy, Bech32 and Bech32m for SegWit and Taproot, each with a checksum."
lang: "en"
type: "glossary-term"
canonical: "https://nuri.com/glossary/address-encoding"
---

# Address Encoding

How address bytes become readable strings: Base58Check for legacy, Bech32 and Bech32m for SegWit and Taproot, each with a checksum.

## Basically

Bitcoin addresses are strings that represent public keys. They use special encoding to catch typos and show network type. Three formats exist: Base58Check, Bech32, and Bech32m.

## Key Takeaways

- Encoding converts raw data to readable text and includes a checksum to catch errors.
- Bech32 and Bech32m can detect up to four errors and suggest corrections for two.
- The prefix (like 1, 3, bc1q, bc1p) tells the network and script type.

## What Is Address Encoding?

Address encoding turns raw cryptographic data into a string humans can read and share. Without it, an address would be an unreadable sequence of bytes.
A good encoding makes addresses shorter, catches typos, and embeds network and script type information. Bitcoin has used three formats over time, each improving error detection and usability.

## How It Works

The process adds a checksum to the data. This checksum is calculated from the address itself and appended to the end. If a character is wrong, the checksum fails.

## Base58Check (Legacy Addresses)

Base58Check was the first encoding, using a 58-character alphabet without 0, O, I, and l to avoid confusion. It avoids + and / symbols so addresses work in email and can be double-clicked.
The 4-byte checksum catches about 1 in 4.3 billion random typos. It cannot locate or correct errors.

## Bech32 (SegWit v0 Addresses)

Bech32 was proposed in 2017 for SegWit version 0 addresses. The name combines BCH (error-correcting code) and 32 (alphabet size).
A Bech32 address has three parts: the prefix, the data, and the checksum. It is case-insensitive, with lowercase default but uppercase preferred for QR codes.

## The Bech32 Length-Extension Bug

Inserting or removing q characters before a final p does not break the checksum. This is harmless for SegWit v0 because witness programs are fixed length. Future versions might face this vulnerability.

## Bech32m (SegWit v1+ and Taproot)

Bech32m fixes the length-extension bug for witness versions 1 to 16. It changes the final XOR constant to 0x2bc830a3, chosen from over one billion candidates.
Taproot addresses use Bech32m and start with bc1p on mainnet. They were activated at block height 709,632 on November 14, 2021.

## Encoding Scheme Comparison

Base58Check is older and less efficient at error detection. Bech32 and Bech32m are newer and better. They share the same prefix bc1 but differ in checksum algorithm.

## Why It Matters

A transcription error can permanently lose funds. The Bech32 family improves safety by detecting more errors and suggesting corrections. Wallets must support all three formats to avoid user workarounds.

## Use Cases

Legacy addresses (1, 3) are still common. SegWit v0 addresses (bc1q) are used for smaller transactions. Taproot addresses (bc1p) enable advanced features like multi-sig and smart contracts.

## Risks and Considerations

Encoding protects against typos, not malicious attacks. It does not prevent address poisoning or clipboard hijacking. Users should always verify the full address.

## Backward Compatibility

Older wallets may not recognize Bech32 or Bech32m. Some exchanges only support legacy formats. Compatibility remains a concern when interacting with outdated software.

## Encoding vs. Security

Encoding prevents accidental mistakes, not attacks. Checksums do not stop address poisoning or clipboard hijacking. Users should always verify the full address.

## Mixed Encoding in Transactions

A single transaction can mix different encodings. Sending from Base58Check to Bech32m is valid. Mixing formats within an HD wallet can complicate UTXO management and increase transaction size.

## Potential for Misidentification

Bech32 and Bech32m share the bc1 prefix. The character after the separator differs: bc1q for SegWit v0, bc1p for Taproot. Using the wrong checksum algorithm rejects valid addresses.
Part of the [Nuri glossary](https://nuri.com/glossary), which defines 1876 Bitcoin, Lightning, wallet, stablecoin and payment terms.
