Skip to content
TToolnest

Regex Tester

Test and debug regular expressions with live match highlighting.

//g
Try:
Matches
Enter a pattern to see matches
Private by design — everything runs in your browser. No upload, no sign-up, no cookies.
Read the guide: The Regex Cheat Sheet: 8 Building Blocks That Cover 90% of Real Work
Ad

About the Regex Tester

Build and debug regular expressions with instant feedback: type a pattern, flip the flags you need (g, i, m, s, u, y), and paste some text to see every match highlighted in place, along with a table of matches showing their position and capture groups. A replace panel lets you preview substitutions using $1, $2 group references.

It uses your browser’s native JavaScript regular-expression engine, so what you see matches how the pattern behaves in real JS code. Everything runs locally — your patterns and text are never uploaded, and there’s no sign-up.

How to use it

  1. 1Write a pattern. Type your regular expression and toggle the flags you need.
  2. 2Add test text. Paste text to see matches highlighted with groups and positions.
  3. 3Preview a replace. Open Replace and use $1, $2 to preview substitutions.

Frequently asked questions

Which regex flavor is this?+

JavaScript (ECMAScript) regular expressions — the same engine browsers and Node use. Patterns you test here behave identically in JS code such as new RegExp() or /…/ literals.

What do the flags do?+

g finds all matches, i is case-insensitive, m makes ^ and $ match line starts/ends, s lets . match newlines, u enables full Unicode, and y (sticky) anchors matching at the last index.

Can I see capture groups?+

Yes. Each match row lists its numbered groups ($1, $2, …); an unmatched optional group shows as ∅. The replace preview also supports $1, $2 references.

Is my pattern or text sent anywhere?+

No. Matching runs entirely in your browser with the native regex engine — nothing is uploaded and there’s no account.

Related tools

More free tools