Regex Tester
Write a regular expression and test it against sample text live — with match highlighting, capture group labels, and flag toggles.
- Encoders & Formatters
- Free
- No sign-up
Global (g)
Case Insensitive (i)
Multiline (m)
Dotall (s)
Matches Highlighted
Enter test text above
Free · No sign-up · Runs in your browser
Why use it
Live highlighting
Matches light up in your sample text as you edit the pattern.
Capture groups
A match table shows each match, its index and every group.
Flag toggles
Switch g, i, m and s on and off to see how each changes the result.
Great for
- Writing validation patterns for emails, phones and IDs
- Extracting data from logs and text files
- Debugging a regex before putting it in code
How to use
- Type a regular expression in the pattern field.
- Paste or type test text in the input area below.
- Matches are highlighted live as you type.
- Toggle flags (g, i, m, s) with the checkboxes.
- Scroll the match table to inspect each match, its index, and capture groups.
Questions
What regex engine is used?
JavaScript's built-in RegExp engine (ECMAScript). Syntax is standard JS regex — no PCRE extensions like \K or lookbehind are supported in older browsers, but modern browsers support most PCRE-like features.
Why do I get 'Invalid regular expression'?
The pattern contains a syntax error — an unclosed group, an unescaped special character, or an unsupported flag. The error message below the pattern field describes what went wrong.
Does anything leave my browser?
No. The expression is built and tested entirely in JavaScript in your browser — nothing is sent to a server.
29 more free tools, no sign-up
Encoders, generators, media and marketing tools — all right in your browser.
Browse all tools