bc1q… and BC1Q… are both valid; Bc1Q… is not. The all-uppercase form is sometimes used in QR codes because it's denser to encode.bc, tb, bcrt). A testnet address pasted into a mainnet wallet will fail before any signing happens — but it's worth catching early.There are four shapes you'll see in the wild: P2PKH legacy addresses starting with 1, P2SH addresses starting with 3, native SegWit (P2WPKH/P2WSH) starting with bc1q, and Taproot (P2TR) starting with bc1p. Testnet equivalents start with m / n / 2 / tb1.
Legacy and P2SH addresses use Base58Check: the last 4 bytes are the first 4 bytes of SHA-256(SHA-256(payload)). SegWit and Taproot use Bech32 / Bech32m, which embed a polynomial-modulo checksum within the address text. We compute both locally — no network call.
That's the point — both checksum schemes are designed so any 1-character flip is detected with extremely high probability. If validation fails, treat the address as a transcription error and re-paste, never "round it up" to a similar one.
Yes. Bech32 specifies that all-uppercase or all-lowercase encodings are valid (mixed case is invalid). All-uppercase is sometimes used in QR codes for better error correction.