Don's Tools · Developers · Regex Tester

Regex tester

Test regular expressions with live highlighting and groups, right in your browser. Nothing is uploaded.

//
Replace with
Works offline: patterns run in your browser with the standard JavaScript regex engine, nothing uploaded. Matches are highlighted live; add a replacement to preview the result.
Quick regex cheatsheet
. any char · \d digit · \w word · \s space · ^ start · $ end · * 0+ · + 1+ · ? 0-1 · {n,m} range · [abc] set · (x|y) or · (..) group · \b word boundary
Regex Tester is a free developer tool that tests JavaScript regular expressions entirely in your browser, with nothing uploaded. It highlights every match live, lists capture groups for each match, supports the global, ignore-case, multiline and dotall flags, previews replacements using captured groups, and reports clear errors for invalid patterns.

Frequently asked questions

Is my text uploaded anywhere?

No. Patterns and text are processed entirely in your browser with the standard JavaScript regular-expression engine, so nothing is uploaded. It works offline once loaded.

Which regex flavour is this?

JavaScript regular expressions, the same ones used in web browsers and Node. The g, i, m and s flags are available as checkboxes.

How do I see capture groups?

Each match in the list shows its capture groups numbered from dollar-one onward, so you can confirm a pattern captures what you expect.

Can I preview a replacement?

Yes. Type a replacement in the box, using dollar-one, dollar-two and so on for captured groups, and copy the replaced text.

Why does my pattern show invalid?

If the pattern has a syntax error, such as an unclosed group or bracket, the exact engine message is shown so you can fix it.