User Rating 0.0
Total Usage 0 times
Supports Legacy, SegWit, and Taproot addresses
Is this tool helpful?

Your feedback helps us improve.

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.

bitcoin qr code btc address bip21 crypto qr generator bitcoin payment segwit taproot

Formulas

The BIP21 payment URI is constructed as follows:

URI = bitcoin:address[?amount=n&label=s&message=s]

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:

checksum = SHA256(SHA256(payload))[0:4]

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):

polymod = ni=0 vi gi mod 230

For valid Bech32, polymod = 1. For Bech32m (Taproot), polymod = 0x2bc830a3.

QR code capacity for byte mode at version v with error correction M:

modules = 21 + 4 × (v 1)

Where v ranges from 1 to 40, yielding grids from 21×21 to 177×177 modules.

Reference Data

Address TypePrefixLength (chars)EncodingChecksumBIP StandardExample PrefixAvg. Fee Impact
P2PKH (Legacy)125 - 34Base58CheckDouble SHA-256 (4 bytes)BIP-131A1zP1...Highest
P2SH (Script Hash)334Base58CheckDouble SHA-256 (4 bytes)BIP-163J98t1...High
P2WPKH (Native SegWit)bc1q42Bech32Polymod (6 chars)BIP-84/141/173bc1qw5...Low
P2WSH (SegWit Script)bc1q62Bech32Polymod (6 chars)BIP-141/173bc1qr...Low
P2TR (Taproot)bc1p62Bech32mPolymod m (6 chars)BIP-86/341/350bc1pw...Lowest
Testnet P2PKHm or n25 - 34Base58CheckDouble SHA-256 - mzBc4...N/A
Testnet P2SH234Base58CheckDouble SHA-256 - 2MzQw...N/A
Testnet SegWittb1q42 - 62Bech32PolymodBIP-173tb1qw...N/A
Testnet Taproottb1p62Bech32mPolymod mBIP-350tb1p0...N/A
QR Error Correction LRecovery: 7%Smallest QR, least redundancy - - -
QR Error Correction MRecovery: 15%Default. Good balance of size and resilienceISO 18004 - -
QR Error Correction QRecovery: 25%Recommended if printing on rough surfacesISO 18004 - -
QR Error Correction HRecovery: 30%Largest QR, survives heavy damageISO 18004 - -
BIP21 URI Schemebitcoin:Wallet auto-fills address, amount, labelBIP-21 - -

Frequently Asked Questions

BIP21 URIs (e.g., bitcoin:bc1q...?amount=0.01) allow wallets to auto-populate the amount, label, and message fields when scanned. A raw address QR requires the sender to manually enter the amount, increasing the risk of typos. Most modern wallets (Electrum, BlueWallet, Sparrow) parse BIP21 natively.
The tool runs full checksum validation before generating the QR. For Legacy/P2SH addresses, it decodes Base58 and verifies the double-SHA-256 checksum bytes. For SegWit/Taproot, it runs the Bech32/Bech32m polymod check. If validation fails, no QR is produced and a specific error message identifies the issue (wrong checksum, invalid character, incorrect length).
Yes. Level M (default, 15% recovery) works for clean prints on white paper. If the QR will be printed on textured materials, affixed outdoors, or partially obscured by a logo, use level Q (25%) or H (30%). Higher correction increases QR module count and physical size. For a typical BIP21 URI of ~70 characters, level M produces a version 5 QR (37×37 modules).
Per BIP21, the amount parameter is always denominated in BTC as a decimal string. For example, 100,000 satoshis is entered as 0.001 BTC. The tool validates that the amount is a positive number with no more than 8 decimal places (1 satoshi = 0.00000001 BTC). Entering satoshi values directly would produce an incorrect payment request.
Yes. Testnet addresses starting with m, n, or 2 (Base58Check) and tb1q or tb1p (Bech32/Bech32m) are recognized and validated. The BIP21 URI will still use the bitcoin: scheme as most testnet wallets accept it, though some may require manual protocol handling.
Each QR module should be at least 0.75mm for close-range phone scanning. A version 5 QR (37×37 modules) at 0.75mm/module yields approximately 28mm × 28mm. For scanning at arm's length (~40cm), target 1.5mm per module (56mm total). The download function exports at 1024×1024 pixels, sufficient for prints up to ~130mm at 200 DPI.