126+ free tools that run in your browser — no uploads, no sign-up

Regex Tester

Test and debug regular expressions against sample text.

Regular expressions are powerful and easy to get wrong.

About Regex Tester

Write a regular expression and instantly see every match, capture group, and highlighted result against your own sample text, with live flag toggles for global, case-insensitive, and multiline matching. This regex tester helps developers debug validation patterns, log parsers, and text-extraction rules without leaving the browser.

Regular expressions are powerful and easy to get wrong. The regex tester lets you write a pattern, toggle flags and see every match and capture group highlighted against your own sample text in real time, so you can refine the expression before it lands in code. It uses JavaScript's regular expression engine, which matches what runs in browsers and Node.js.

How to use Regex Tester

  1. Type your regular expression into the pattern field.
  2. Set flags such as global (g), case-insensitive (i) or multiline (m).
  3. Paste or type the text you want to test against.
  4. Inspect the highlighted matches and captured groups, and adjust the pattern.

Key features

  • Live highlighting of all matches as you type.
  • Capture groups listed for each match.
  • Toggleable flags for global, ignore-case, multiline and more.
  • Clear feedback when the pattern is invalid.

Common use cases

  • Building a validation pattern for emails, phone numbers or postcodes.
  • Extracting IDs or timestamps from log lines.
  • Debugging why a search-and-replace pattern matches too much.

Frequently asked questions

Related tools

More Developer tools