Regex Tester

Test a regular expression against your text in the browser. See every match highlighted, inspect capture groups, toggle flags, and try replacements live. Free, no signup, nothing uploaded.

1Regular expression
/ / g
2Test string
Matches highlighted
Matches show up here.
3Output
No matches yet.
Quick reference

How to use the regex tester

1

Enter Your Pattern

Type your regular expression and toggle the flags you need, like global, ignore case, or multiline.

2

Paste Your Test String

Drop in the text you want to match. Every match is highlighted as you type, with a running count.

3

Inspect or Replace

Open the Matches tab to see capture groups for each match, or switch to Replace to try a substitution with $1 style references.

Pixellize free online tools illustration showing browser, file, and gear icons

Build the Right Pattern, Faster

Regular expressions are easy to write and hard to get right. A pattern that looks correct can quietly match too much, too little, or nothing at all, and staring at the raw syntax rarely tells you why. The fastest way to fix one is to watch it run against real text.

This tester does that. You type a pattern, paste some text, and every match is highlighted as you go. Open a match to see its capture groups, numbered and named, so you can confirm the parts you actually care about are being pulled out correctly.

It uses the same regular expression engine your JavaScript runs, with all the flags you would use in code, so what you see here is what you get in the browser. Switch to replace to preview a substitution, lean on the cheatsheet when you forget a token, and because it all runs locally, you can test against private data without it leaving your machine.

Why Use Our Regex Tester?

Live Match Highlighting

Every match lights up in your text the moment you change the pattern, so you see results instantly.

Capture Groups

Each match lists its numbered and named groups, so you can confirm exactly what was captured.

All the Flags

Toggle global, ignore case, multiline, dotall, unicode, and sticky to match how your code runs.

Replace Preview

Try a replacement with $1 and named group references and see the result update live.

Quick Reference

A built-in cheatsheet of common tokens is one click away when you forget the syntax.

Runs in Your Browser

Your pattern and text are tested on your device. Nothing is uploaded, logged, or stored.

Frequently Asked Questions

Common questions about testing regular expressions.

What regex flavor does this use?
It uses the JavaScript regular expression engine built into your browser, the same one that runs in Node and in front-end code. Patterns you test here behave the same way in your JavaScript.
What do the flags mean?
Global finds all matches instead of just the first, ignore case makes it case-insensitive, multiline changes how the start and end anchors work, dotall lets the dot match newlines, unicode enables full Unicode, and sticky matches only from the last position.
How do I see capture groups?
Each match in the Matches tab lists its groups. Numbered groups show as $1, $2 and so on, and named groups, written as a question mark followed by the name in angle brackets, show under their name.
Can I test a replacement?
Yes. Switch to the Replace tab and enter a replacement string. Use $1, $2 for numbered groups, the whole match for the dollar-ampersand, and named group references. The result updates as you type.
Why does my pattern show an error?
If the pattern is not valid, the engine cannot build it and shows the error message. Common causes are an unclosed group or bracket, or a stray backslash. Fix the syntax and the matches return.
Is this regex tester free?
Yes, it is completely free with no signup and no limits. Everything runs in your browser, so your pattern and text stay on your device.
Scroll to Top