Tools / Regex Tester
Regex Tester
Test JavaScript regular expressions locally. Inspect matches, capture groups and optional replacements with safety caps against runaway patterns.
Limits: pattern 500 chars, test 100000 chars, 1000 matches, short time budget per run.
0 / 100,000
Frequently asked questions
Is my text uploaded to a server?
No. Testing runs entirely in your browser. Nothing is sent or stored on a server.
Which flags are supported?
g (global), i (ignore case), m (multiline), s (dotAll) and u (unicode). Unsupported flag characters are ignored.
How do you limit risky patterns?
Pattern and test length are capped, match collection stops at 1,000 hits and a short time budget applies while iterating matches. Catastrophic patterns can still hang the tab briefly — keep patterns simple when testing untrusted input.
How does replace work?
The replacement field uses JavaScript String.replace syntax, including $1-style group references. With the g flag, all matches are replaced; without it, only the first match is.
Let's build something you're proud of
I help businesses launch, optimize and maintain their online presence, from code to SEO.
Let's talkRelated tools
Cron Expression Explainer
Free cron expression explainer. Translate a five-field crontab line into plain English and preview the next scheduled runs in your browser.
Color Contrast Checker
Free WCAG color contrast checker. Test text against background colors, see the contrast ratio and AA/AAA results, and get an accessible color suggestion.
Text Diff
Free online text diff and compare tool. Compare two texts line by line with added, removed and unchanged highlighting. Runs in your browser with no upload.
Duplicate Detector
Free online duplicate line finder. Detect repeated lines, remove duplicates, or count frequencies in lists and logs. Runs in your browser with no upload.
Image Resizer and Compressor
Free online image resizer and compressor. Resize photos, convert to WebP or JPEG and shrink file size in your browser, with no upload.
robots.txt Generator
Free robots.txt generator. Build user-agent groups with allow and disallow rules, add a sitemap, block AI crawlers and copy the file.