Regex Tester

Write a regex, paste test text, and see every match highlighted in real time — plus capture groups and a replace mode.

Your pattern and test text never leave your browser.

How to use Regex Tester

  1. Enter your regular expression and any flags (like g, i, m).
  2. Paste the text to test against.
  3. Matches highlight automatically, with a list of captures below.
  4. Switch to “Replace” mode to preview replacements.

About this tool

Regular expressions are powerful but easy to get subtly wrong. The tester gives instant feedback — highlighting matches, listing capture groups, and showing errors as you type, with a replace preview for when you are building a substitution.

Frequently asked questions

Which regex flavour does this use?
The JavaScript engine built into your browser. Most common syntax is the same as in Python, PHP and other engines.
What do the flags mean?
g finds all matches, i ignores case, m makes ^ and $ match line starts and ends, s lets . match newlines, and u enables Unicode mode.

Related tools