Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocsChangelog
Crypto
#bitcoin
#btc
#bech32
#segwit

Bitcoin Bech32 Address (SegWit)

Matches a Bitcoin native SegWit address in Bech32 format — starts with bc1 followed by 6–87 lowercase alphanumeric characters.

Bitcoin wallet validationPayment processorsCrypto exchanges
/
/
Safe
Test String
2 matches
bb'b' — literal character
cc'c' — literal character
11'1' — literal character
[…]{6,87}Character class […]Matches any single character listed in this set — repeated between 6 and 87 times · {6,87} — between 6 and 87 times
aa'a' — literal character
c-hc-hc-h — range from 'c' to 'h'
j-nj-nj-n — range from 'j' to 'n'
p-zp-zp-z — range from 'p' to 'z'
00'0' — literal character
2-92-92-9 — range from '2' to '9'
Pattern: 25 charsInput: 86 chars
100% client-side · private

Valid Examples

  • bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
  • bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge52

Invalid Examples

  • 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2
  • 0xde0B295669a9FD93d5F28D9Ec85E40f4
  • bc1short

Usage & Integration

Validate Bitcoin Bech32 Address (SegWit) natively in your backend or frontend without copying regex strings.

Node / Edge

import { validate } from '@regexto/validators';

validate('bech32-address', '...');

Python

from regexto_validators import validate

validate("bech32-address", "...")

Go

import "github.com/regex-to/validators-go"

valid, err := validators.Validate("bech32-address", "...")

PHP

use RegexTo\Validators\Validator;

Validator::validate('bech32-address', '...');

Rust

use regexto_validators::validate;

let is_valid = validate("bech32-address", "...").unwrap();