Regex Tester & Pattern Library
Test regular expression patterns with live match highlights and common pattern presets 100% locally in your browser.
Regular Expression (Regex) Testing & Pattern Reference Guide
Test JavaScript RegExp expressions in real-time with instant token matches, capture groups, and index positions.
1. Common Flags
g (global), i (case-insensitive), m (multiline).
2. Pre-Built Presets
Instantly load production-ready regex rules for Email validation, Web URLs, and IPv4 addresses.
3. 100% Client-Side
All regex evaluations execute locally in browser memory without sending string data to external APIs.
About the Regex Tester
The Regex Tester evaluates a pattern against sample text and highlights every match as you type. Capture groups are listed individually so you can confirm a replacement template will pull the right fragment, and the global, case-insensitive, multiline and dotall flags can be toggled to see how each changes the result. It uses the JavaScript regular expression engine, so behaviour matches what runs in Node and the browser.
How to use the Regex Tester
- Enter your regular expression pattern and set the flags you need.
- Paste the sample text you want to match against.
- Review the highlighted matches and the captured group values.
Frequently asked questions
Which regex flavour does this use?
The ECMAScript (JavaScript) flavour. Most syntax is shared with PCRE, but features such as lookbehind, named groups and Unicode property escapes depend on your browser version, and POSIX character classes like [:alpha:] are not supported.
Why does my pattern only match once?
Without the global flag, matching stops at the first result. Enable the g flag to find every occurrence in the input.
What is a capture group?
Parentheses around part of a pattern capture whatever that part matched, so it can be extracted or referenced in a replacement as $1, $2 and so on. Use (?: ... ) when you need grouping for alternation or quantifiers but do not want to capture.
Related tools
- String Case ConverterFree online case converter. Instantly transform text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case and more. Runs 100% in your browser.
- Diff CheckerFree online text diff checker. Compare two strings side-by-side to highlight line additions, deletions, and modifications with character stats. 100% private.
- Code FormatterFree online code beautifier for JSON, SQL, XML, HTML and CSS. Format minified code into readable, indented output instantly and privately.
Regex Tester is free to use with no account, no ads and no usage limits. Every calculation runs locally in your browser, so nothing you paste is ever uploaded. See our privacy policy.