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.
Examples
Pattern: [\w.+-]+@[\w-]+\.[\w.-]+
Text: ping alice@x.com or bob+test@y.io2 matches: alice@x.com, bob+test@y.ioPattern: ^\(\d{3}\) \d{3}-\d{4}$
Text: (415) 555-2671MatchPattern: (\d{4})-(\d{2})-(\d{2})
Text: 2026-03-15Group 1: 2026, Group 2: 03, Group 3: 15Frequently 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
- 🔍 Text Diff Checker — Compare two pieces of text line by line. See additions, removals, and changes.
- 🔗 Slug Generator — Convert any text to a URL-safe slug (kebab-case, lowercase, ASCII).
- 🔢 Word & Character Counter — Count words, characters, sentences, paragraphs, and reading time.
Why this tool
vs typical free web-tool sites
| 1vw | Typical free site | |
|---|---|---|
| Price | Free | Free |
| Signup required | No | Often (for premium features) |
| Ads inside the tool | No | Yes (banner + video) |
| Data sent to server | No (browser-only) | Yes (inputs analyzed for ads) |
| Total tools | 96 | Often <20 or scattered across sites |
| Bookmarkable URL per tool | Yes | Mixed |
| Loads in under 1s | Yes (static) | Often slow (ad tracking) |
| Multilingual | EN / ES / PT / FR / DE | Usually EN only |
| Open source | Yes | No |