Regex Tester
Build a JavaScript regular expression, test it against sample or custom text, inspect captures, and preview replacements. Matching stays in your browser.
Matching is limited to 10,000 characters and runs in a separate worker when supported.
Highlighted matches
0 matchesMatch details
- Enter a pattern and test string to see matches.
Replace preview
Notes
Quick reference: \d matches a digit, \w a word character, and \s whitespace. ^ and $ mark line or input boundaries; *, +, ?, and {n,m} set repetition; parentheses capture groups.
Flags: g finds every match, i ignores case, m makes ^ and $ work per line, s lets . match line breaks, and u enables Unicode-aware matching. Matching runs in a Web Worker with a time limit when supported.
Patterns and test text remain in this browser and are not uploaded or saved in browser storage.
Frequently asked questions
Which regular expression syntax is supported?
The tester uses JavaScript RegExp syntax and supports the g, i, m, s, and u flags.
Can a regular expression freeze my browser tab?
Matching runs in a separate Web Worker with a time limit when supported. A timed-out pattern is stopped and reported; the tool also limits input size.
Is my test text uploaded?
No. Matching and replacement preview run locally in your browser.