All tools · 📐 Format / Inspect

🔍 Regex Tester

Build and debug JavaScript regular expressions. Type your pattern and flags, paste a test string — see every match, capture group, and the highlighted text inline. Reference table for common metacharacters included.

Loading tool…

Examples

Extract email addresses
InputPattern: [\w.+-]+@[\w-]+\.[\w.-]+ Text: ping alice@x.com or bob+test@y.io
Output2 matches: alice@x.com, bob+test@y.io
Validate phone number
InputPattern: ^\(\d{3}\) \d{3}-\d{4}$ Text: (415) 555-2671
OutputMatch
Capture date parts
InputPattern: (\d{4})-(\d{2})-(\d{2}) Text: 2026-03-15
OutputGroup 1: 2026, Group 2: 03, Group 3: 15

Frequently asked questions

Which regex flavor is this?

JavaScript / ECMAScript regex. It is similar to but not identical to PCRE, Python re, or POSIX. Lookbehinds, named groups, and Unicode flag are all supported.

What do the flags do?

g = find all matches, i = case-insensitive, m = ^/$ match line boundaries, s = . matches newline, u = Unicode, y = sticky (match from lastIndex).

Why is my pattern slow?

Catastrophic backtracking. Patterns like (a+)+ on input "aaaa...!" can take exponential time. Avoid nested quantifiers; use possessive quantifiers or atomic groups (limited support in JS).

How do I escape a literal dot or slash?

Backslash before it: \. and \/. For dynamic regexes, build them with new RegExp() and escape user input with replace(/[.*+?^${}()|[\]\\]/g, "\\$&").

About this tool

Regex Tester runs entirely in your browser using standard Web APIs. No data is sent to any server. The source for this tool is in our public GitHub repository.

Related tools

← All 96 tools

Why this tool

vs typical free web-tool sites

1vwTypical free site
PriceFreeFree
Signup requiredNoOften (for premium features)
Ads inside the toolNoYes (banner + video)
Data sent to serverNo (browser-only)Yes (inputs analyzed for ads)
Total tools96Often <20 or scattered across sites
Bookmarkable URL per toolYesMixed
Loads in under 1sYes (static)Often slow (ad tracking)
MultilingualEN / ES / PT / FR / DEUsually EN only
Open sourceYesNo