Regex Tester
Test regular expressions live against sample text with flags, matches and capture groups. Use this Regex Tester free, directly in your browser. It runs entirely on your device, so your data stays private, and it works on desktop and mobile without any signup.
Regex Tester
Runs locally0 characters
How do I test a regular expression?
Enter a pattern and flags, paste test text, and see every match with its position and capture groups. Matching happens live in your browser as you type.
Read Regex Basics for DevelopersCommon workflows
Features
- Live matching as you type
- Flags: g, i, m, s, u, y
- Match list with indices
- Capture group details
How to use Regex Tester
- 1 Enter a regular expression (without the surrounding slashes).
- 2 Toggle flags such as g for global or i for case-insensitive.
- 3 Paste test text and inspect matches and capture groups instantly.
Examples
Email-ish
a@b.com
foo@bar.io Pattern: [\w.]+@[\w.]+\.\w+
Find numbers
abc 123 def 45 Pattern: \d+ with the g flag
Common errors and fixes
The output is empty.
Check that the input is valid and not empty.
The result looks unexpected.
Review the format notes below the input and try again.
Frequently asked questions
Is Regex Tester free?
Yes. Regex Tester is free with no signup, no installation and no usage limits.
Is my data uploaded?
No. Everything runs locally in your browser — your data never leaves your device.
Does it work on mobile?
Yes. The layout adapts to small screens and works in any modern browser.
Why does my pattern with ^ only match the first line?
Add the m flag so ^ and $ match the start and end of each line.
What do capture groups show?
Named and numbered groups are listed for each match, so you can check exactly what was captured.
Related tools
See all Text & Code toolsString Escape / Unescape
Escape and unescape backslashes, quotes, newlines and Unicode escapes in text.
Text Diff Checker
Compare two blocks of text line by line and see additions and removals highlighted.
Case Converter
Convert text between camelCase, snake_case, kebab-case, PascalCase, UPPER and lower.