The tester updates as you type. Enter the pattern without surrounding slashes, add any JavaScript flags, then paste realistic text. Matches and replacements are computed locally in your browser, so logs, source snippets and test data are not uploaded.
Free Regex Tester
Runs entirely in your browser - no upload, no sign-up.
JavaScript flags: d, g, i, m, s, u, v, y. Do not include slashes.
JavaScript replacement tokens are supported, including $&, $1, and $<name>.
What is a regex tester?
A regex tester runs a regular expression against sample text and shows every match, its string position, capture groups and replacement result. This tester uses your browser's JavaScript RegExp engine, so you can check a pattern with the exact flags and replacement tokens used in front-end or Node.js code.
How to use
- 1Enter the pattern. Type the regular expression without leading or trailing slash characters.
- 2Set JavaScript flags. Add flags such as g for all matches, i for case-insensitive matching or m for multiline anchors.
- 3Paste test text. Review each live match, its start and end offsets, numbered captures and named captures.
- 4Try a replacement. Enter replacement text with tokens such as $&, $1 or $<name>, then copy the preview.
Who it's for
- Front-end developers checking form validation, parsing and search patterns before adding them to an application.
- Back-end JavaScript developers debugging log, URL or identifier extraction with Node.js-compatible syntax.
- Data cleanup work where capture groups and replacement tokens reshape repeated text safely.
- Regex learners who need to see how flags, anchors and groups change the actual matches.
FAQ
Is this regex tester free?
Yes. The regex tester is free to use with no sign-up, account or usage limit. It runs immediately in a modern browser and includes live match details, capture groups and a replacement preview.
Are my pattern and test text uploaded?
No. The pattern, flags, test text and replacement are processed locally with the browser's JavaScript RegExp engine. The data you type into the tester is not sent to a server.
How much text can I test?
There is no fixed upload limit because nothing is uploaded. Browser memory and the complexity of your pattern are the practical limits. The match list displays the first 500 results to keep the page responsive, while the replacement preview still processes the full text.
Which regex flavor does this tester use?
It uses JavaScript regular expression syntax through the native RegExp engine. Patterns written for PCRE, Python, Java or .NET can behave differently because those engines support different features and escape rules.
What does the g flag change?
The g flag makes JavaScript continue after the first match and find every later match. Without g, the tester reports only the first match and the replacement preview replaces only that occurrence.
Can I test numbered and named capture groups?
Yes. Numbered groups appear as $1, $2 and so on, while groups written as (?<name>...) also appear by name. Unmatched optional groups are labeled clearly, and both group styles can be used in the replacement expression.
Why does a valid pattern show no matches?
A valid pattern can still fail to match the current text. Check letter case, whitespace, anchors and flags first. The m flag changes how ^ and $ treat line boundaries, while the s flag lets a dot match line-break characters.