Bitcoin Address QR Code Generator
Generate QR codes for Bitcoin addresses with optional BIP21 amount, label, and message. Supports Legacy, SegWit, and Taproot formats.
About
A misconfigured Bitcoin payment request costs the sender their funds or causes indefinite delays. Address formats vary between Legacy (1...), SegWit (bc1q...), and Taproot (bc1p...), each with distinct checksum algorithms. This tool validates the address structure using Base58Check with double SHA-256 or Bech32/Bech32m polymod verification, then encodes a BIP21-compliant URI into a QR code matrix computed entirely in your browser. No data leaves your device.
The generated QR follows ISO/IEC 18004 with byte-mode encoding and error correction level M (recovers up to 15% damage). Optional fields for amount (in BTC, not satoshis), label, and message are appended per BIP21 query parameters. Note: this tool does not verify that the address exists on-chain or has ever received funds. It validates format and checksum only.
Formulas
The BIP21 payment URI is constructed as follows:
Where address is a validated Bitcoin address, n is the amount in BTC (decimal, e.g., 0.001), and s are URI-encoded strings.
Base58Check validation computes:
Where payload is the version byte concatenated with the 20-byte hash. The last 4 bytes of the decoded address must match checksum.
Bech32 validation uses a polymod function over GF(230):
For valid Bech32, polymod = 1. For Bech32m (Taproot), polymod = 0x2bc830a3.
QR code capacity for byte mode at version v with error correction M:
Where v ranges from 1 to 40, yielding grids from 21×21 to 177×177 modules.
Reference Data
| Address Type | Prefix | Length (chars) | Encoding | Checksum | BIP Standard | Example Prefix | Avg. Fee Impact |
|---|---|---|---|---|---|---|---|
| P2PKH (Legacy) | 1 | 25 - 34 | Base58Check | Double SHA-256 (4 bytes) | BIP-13 | 1A1zP1... | Highest |
| P2SH (Script Hash) | 3 | 34 | Base58Check | Double SHA-256 (4 bytes) | BIP-16 | 3J98t1... | High |
| P2WPKH (Native SegWit) | bc1q | 42 | Bech32 | Polymod (6 chars) | BIP-84/141/173 | bc1qw5... | Low |
| P2WSH (SegWit Script) | bc1q | 62 | Bech32 | Polymod (6 chars) | BIP-141/173 | bc1qr... | Low |
| P2TR (Taproot) | bc1p | 62 | Bech32m | Polymod m (6 chars) | BIP-86/341/350 | bc1pw... | Lowest |
| Testnet P2PKH | m or n | 25 - 34 | Base58Check | Double SHA-256 | - | mzBc4... | N/A |
| Testnet P2SH | 2 | 34 | Base58Check | Double SHA-256 | - | 2MzQw... | N/A |
| Testnet SegWit | tb1q | 42 - 62 | Bech32 | Polymod | BIP-173 | tb1qw... | N/A |
| Testnet Taproot | tb1p | 62 | Bech32m | Polymod m | BIP-350 | tb1p0... | N/A |
| QR Error Correction L | Recovery: 7% | Smallest QR, least redundancy | - | - | - | ||
| QR Error Correction M | Recovery: 15% | Default. Good balance of size and resilience | ISO 18004 | - | - | ||
| QR Error Correction Q | Recovery: 25% | Recommended if printing on rough surfaces | ISO 18004 | - | - | ||
| QR Error Correction H | Recovery: 30% | Largest QR, survives heavy damage | ISO 18004 | - | - | ||
| BIP21 URI Scheme | bitcoin: | Wallet auto-fills address, amount, label | BIP-21 | - | - | ||