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

Bitcoin Address (Legacy)

Matches a legacy Bitcoin address — P2PKH (starting with 1) or P2SH (starting with 3), 25–34 Base58 characters.

Crypto payment validationWallet address inputTransaction verification
/
/
Safe
Test String
2 matches
[…]Character class […]Matches any single character listed in this set
11'1' — literal character
33'3' — literal character
[…]{25,34}Character class […]Matches any single character listed in this set — repeated between 25 and 34 times · {25,34} — between 25 and 34 times
a-ka-ka-k — range from 'a' to 'k'
m-zm-zm-z — range from 'm' to 'z'
A-HA-HA-H — range from 'A' to 'H'
J-NJ-NJ-N — range from 'J' to 'N'
P-ZP-ZP-Z — range from 'P' to 'Z'
1-91-91-9 — range from '1' to '9'
Pattern: 31 charsInput: 69 chars
100% client-side · private

Valid Examples

  • 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2
  • 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy

Invalid Examples

  • 0BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2
  • 1BvBMSEYstWetq
  • 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2_extra

Usage & Integration

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

Node / Edge

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

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

Python

from regexto_validators import validate

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

Go

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

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

PHP

use RegexTo\Validators\Validator;

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

Rust

use regexto_validators::validate;

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