Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocsChangelog
Crypto
#ethereum
#eth
#evm
#crypto

Ethereum Address

Matches an Ethereum address — 0x followed by exactly 40 hexadecimal characters.

✓ Crypto payment validation✓ Smart contract interaction✓ DeFi apps
/
/
Safe
Test String
2 matches
00— '0' — literal character
xx— 'x' — literal character
[…]{40}Character class […]— Matches any single character listed in this set — repeated exactly 40 times · {40} — exactly 40 times
a-fa-f— a-f — range from 'a' to 'f'
A-FA-F— A-F — range from 'A' to 'F'
0-90-9— 0-9 — range from '0' to '9'
Pattern: 17 charsInput: 85 chars
100% client-side · private

✓ Valid Examples

  • 0x742d35Cc6634C0532925a3b844Bc454e4438f44e
  • 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe

✗ Invalid Examples

  • 742d35Cc6634C0532925a3b844Bc454e4438f44e
  • 0x742d35Cc6634C0532925a3b844Bc454e4438f44
  • 0xGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG

Usage & Integration

Validate Ethereum Address natively in your backend or frontend without copying regex strings.

Node / Edge

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

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

Python

from regexto_validators import validate

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

Go

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

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

PHP

use RegexTo\Validators\Validator;

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

Rust

use regexto_validators::validate;

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