Free Regex Validator 2025

Test Regular Expressions with 20+ Common Patterns

Best free regex validator for 2025. Test your regular expressions with real-time matching, explore 20+ common patterns (email, phone, URL, password), and learn regex syntax. Trusted by 100K+ developers worldwide.

📍 Ad Placeholder (top)
Ads don't show on localhost in development mode
Slot ID: 4003156004

Regex Pattern

Results

Pattern StatusValid
Matches Found0

No matches found

Common Regex Patterns by Category

Email Validation

Validation

Validates email addresses with proper format

^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Example: user@example.com

Phone Number (US)

Validation

US phone number with various formats

^\+?1?[-.\s]?\(?([0-9]{3})\)?[-.\s]?([0-9]{3})[-.\s]?([0-9]{4})$
Example: (555) 123-4567

Phone Number (International)

Validation

International phone number format

^\+[1-9]\d{1,14}$
Example: +1234567890

URL Validation

Validation

Validates HTTP/HTTPS URLs

^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$
Example: https://www.example.com

Strong Password

Security

Password with uppercase, lowercase, number, and special char

^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
Example: MyPass123!

Credit Card (Visa)

Finance

Visa credit card numbers

^4[0-9]{12}(?:[0-9]{3})?$
Example: 4111111111111111

Credit Card (MasterCard)

Finance

MasterCard credit card numbers

^5[1-5][0-9]{14}$
Example: 5555555555554444

Date (YYYY-MM-DD)

Date/Time

ISO date format validation

^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$
Example: 2024-12-25

Time (HH:MM)

Date/Time

24-hour time format

^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$
Example: 14:30

IPv4 Address

Network

Validates IPv4 addresses

^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
Example: 192.168.1.1

IPv6 Address

Network

Validates IPv6 addresses

^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$
Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

Hex Color Code

Design

CSS hex color codes (3 or 6 digits)

^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
Example: #FF5733

RGB Color

Design

RGB color format validation

^rgb\(\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])\s*,\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])\s*,\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])\s*\)$
Example: rgb(255, 87, 51)

Username (3-20 chars)

Validation

Username with alphanumeric and underscore

^[a-zA-Z0-9_]{3,20}$
Example: user_123

Social Security Number

Validation

US SSN format (XXX-XX-XXXX)

^\d{3}-\d{2}-\d{4}$
Example: 123-45-6789

ZIP Code (US)

Validation

US ZIP code with optional +4

^\d{5}(-\d{4})?$
Example: 12345-6789

Alphanumeric Only

Validation

Only letters and numbers allowed

^[a-zA-Z0-9]+$
Example: abc123

No Spaces

Validation

No whitespace characters allowed

^\S+$
Example: noSpacesHere

Decimal Number

Numbers

Decimal number with 1-2 decimal places

^\d+\.\d{1,2}$
Example: 123.45

Positive Integer

Numbers

Positive integers only (no leading zeros)

^[1-9]\d*$
Example: 123

Other Developer Tools