Skip to content

Regex Tester

Test and debug regular expressions online with real-time matching and group highlighting. Free regex tester for JavaScript and Python.

Developer Tools
Instant results
Email
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$

Validates email addresses

URL
^https?:\/\/[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(\/\S*)?$

Matches URLs

Phone (US)
^\+?1?[-.]?\(?\d{3}\)?[-.]?\d{3}[-.]?\d{4}$

US phone numbers

Date (YYYY-MM-DD)
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$

ISO date format

Time (HH:MM)
^([01]\d|2[0-3]):[0-5]\d$

24-hour time

IPv4
^((25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)\.){3}(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)$

IPv4 addresses

Hex Color
^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$

Hex color codes

Credit Card
^\d{4}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$

Credit card numbers

ZIP Code (US)
^\d{5}(-\d{4})?$

US ZIP codes

SSN
^\d{3}-\d{2}-\d{4}$

Social Security Number

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

Min 8 chars, mixed case, number, symbol

Username
^[a-zA-Z0-9_]{3,16}$

3-16 alphanumeric or underscore

Slug
^[a-z0-9]+(?:-[a-z0-9]+)*$

URL-friendly slug

HTML Tag
<([a-z]+)([^<]+)*(?:>(.*)|\/)(\/>|<\/\1>)

Matches HTML tags

Numbers Only
^\d+$

Only digits

Letters Only
^[a-zA-Z]+$

Only letters

How to Use Regex Tester

1

Open Regex Tester

Navigate to Regex Tester in your browser — no installation or sign-up required.

2

Enter your data

Type, paste, or upload the content you want to process into the input area.

3

Configure options

Adjust any available settings to customize the output to your needs.

4

Get your result

The result appears instantly. Copy it to your clipboard or download it as a file.

Frequently Asked Questions

Regex Tester is a free online developer utilities tool. Test and debug regular expressions online with real-time matching and group highlighting. Free regex tester for JavaScript and Python.