Bech32 Encoder
Enter a human-readable prefix and the data hex bytes to encode.
Result
How it is calculated
The tool builds a SegWit address in the style of BIP173 (version 0) and BIP350 (version 1 and up). The prefix (HRP) must be lowercase ASCII, 1 to 83 characters; the witness version is a number from 0 to 16. The hex data may contain spaces and a leading 0x, but must have an even number of digits and be 2 to 40 bytes; for version 0 it must be exactly 20 or 32 bytes. The bytes are regrouped from 8-bit to 5-bit values with zero padding, the version is placed in front, and a 6-symbol checksum is added. Version 0 uses checksum constant 1 (bech32); versions 1 to 16 use 0x2bc830a3 (bech32m). Symbols come from qpzry9x8gf2tvdw0s3jn54khce6mua7l, giving HRP + "1" + version + data + checksum. Anything invalid, or an output over 90 characters, shows no result.
Worked example
Take prefix bc, version 0 and the 20-byte program 751e76e8…3bd6. That is 20 bytes, or 160 bits. Regrouped into 5-bit values this is 32 symbols; the first byte 01110101 and the start of the next, 00011110, give 01110, 10100, 01111, which map to w, 5, 0. The version 0 maps to the symbol q and goes first, and 6 checksum symbols follow the data. The tool prints bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 with prefix bc and 20 bytes. Changing only the version to 1 gives bc1pw508d6qejxtdg4y5r3zarvary0c5xw7kj9wkru, because bech32m uses a different checksum constant.
Common mistakes
- Entering uppercase letters in the prefix, such as
BC. BIP173 does not allow mixed case, so the tool shows no result instead of lowercasing it for you; typebc. - Using a 21-byte or 19-byte program with version 0. Version 0 addresses carry exactly 20 bytes (key hash) or 32 bytes (script hash); other lengths are rejected. Only versions 1 to 16 accept 2 to 40 bytes.
- Pasting a hex string with an odd digit count or non-hex characters. Each byte needs two digits, so
abcis invalid while0abcis fine. - Using the wrong prefix for the network.
bcis Bitcoin mainnet andtbis testnet; the same bytes give a different string and checksum, and funds sent to the wrong network address are not recoverable. - Sending real funds to an address made from made-up bytes. The tool only encodes what you type; it cannot know whether anyone holds the key behind that program.
About this calculator
Bech32 is the checksummed text encoding defined in BIP173 for representing Bitcoin's SegWit (native witness) addresses. It combines a human-readable prefix — like “bc” for Bitcoin mainnet — with the witness program data, encoded using a 32-character alphabet chosen to minimize the chance of transcription errors and support strong error detection.
Bech32 addresses are the ones that start with “bc1”, and their checksum lets a wallet reliably catch mistyped or corrupted addresses before funds are sent to the wrong place — a major usability improvement over the older Base58Check format. Wallet developers, exchange engineers, and blockchain tooling builders use encoders like this to generate and validate bech32 addresses when implementing SegWit support.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments