Regex Tester
Test regular expressions live — matches, groups and replace preview, in your browser.
Last updated:
Tool
4 matches
4 matches · 196 characters
Matches highlighted
4 matches
#1 · index 15: ada@example.com
Group 1: "ada" · Group 2: "example.com"
#2 · index 43: grace.hopper@navy.mil
Group 1: "grace.hopper" · Group 2: "navy.mil"
#3 · index 82: alan@turing.org.uk
Group 1: "alan" · Group 2: "turing.org.uk"
#4 · index 120: team@freetoolskit.org
Group 1: "team" · Group 2: "freetoolskit.org"
4
Matches
2
Capture groups
15
First match at index
$1 inserts the first capture group, $2 the second, $$ a dollar sign.
Your files never leave your device - processing happens in your browser.
Related tools: JSON Formatter · Base64 Encoder / Decoder · URL Encoder / Decoder
A regex tester is a tool that checks a regular expression — a pattern for matching text — against a sample string and shows every match it finds. FreeToolsKit's regex tester runs the pattern live as you type, highlights each match in the test text, lists the match positions and capture groups, and previews replacements. It runs entirely in your browser using JavaScript's built-in regular-expression engine — your pattern and text are never uploaded.
How do you test a regular expression?
- Type your pattern into the “Regular expression” box above — the sample finds email addresses — or pick a common pattern from the “Common pattern” list.
- Tick the flags you need: Global is on by default; add Case-insensitive, Multiline, Dot matches newlines or Unicode as needed.
- Paste or type the text to test into the “Test string” box; matches are highlighted as you type.
- Read the match list below: each match shows its position in the text and the text each capture group matched.
- To try a replacement, type it into “Replace with” — $1 and $2 insert capture groups — then copy the result or download it as a .txt file; Reset returns to the sample.
What is the Regex Tester used for?
- Checking an email or URL validation pattern against real addresses before it goes into code.
- Finding every date, phone number or order ID in a pasted log or export.
- Testing a search-and-replace pattern on sample text before running it on a whole file.
- Learning regular expressions by trying a pattern and seeing exactly what it matches.
- Debugging why a pattern matches too much or too little by reading the match positions and groups.
Frequently asked questions
Is the regex tester free?
Yes. The tool is completely free with no sign-up and no usage cap. Test as many patterns as you like, as often as you like.
Is my pattern or test text uploaded anywhere?
No. Matching uses the JavaScript regular-expression engine built into your browser. Nothing you type is sent to a server, stored or logged — closing the tab removes it completely.
Which regex flavour does it use?
JavaScript. The pattern runs with the browser's built-in RegExp engine, so the syntax is the same as in JavaScript code: \d for a digit, \w for a word character, ( ) for capture groups, and $1, $2 in replacements. Patterns written for other languages usually work, but a few constructs differ between flavours.
Why does my pattern show no matches?
Either the pattern is invalid — the error message names the problem, for example an unclosed bracket — or the test text contains nothing the pattern matches. Check the pattern for a typo, and check the flags: without the case-insensitive flag, [a-z] will not match capital letters.
What are the limits?
Patterns are limited to 1,000 characters and test text to 100,000 characters, and the match list shows at most the first 1,000 matches. The highlight preview is hidden for text over 10,000 characters, but the match list still works. The replace preview uses JavaScript's String.replace, so $1 inserts the first capture group, $2 the second, and $$ inserts a literal dollar sign.
Related tools
- JSON FormatterValidate, pretty-print and minify JSON with precise error pinpointing.
- Base64 Encoder / DecoderEncode and decode Base64 for text and files, with data-URI preview.
- URL Encoder / DecoderEncode or decode URLs and URL components, in full-URL or component mode.
- HTML Entities ConverterEncode text to HTML entities and decode entities back to text, in your browser.
- XML FormatterFormat, validate and minify XML — 2, 4 or tab indent, with line-and-column errors.
- Diff CheckerCompare two texts line by line — added, removed and unchanged lines, in your browser.
Last updated:
- Free forever
- Files stay on your device
- No sign-up