Developer · Free Tool

Regex Tester

Test regular expressions against sample text with live match highlighting and capture-group output.

About this tool

Write a regular expression, set its flags (g, i, m, s), and test it against any sample text. Matches are highlighted live in the text, and each match is listed with its position and capture groups. Invalid patterns show the exact syntax error.

Testing a regex against real sample data before shipping it saves painful debugging later — especially for patterns used in validation, log parsing, and find-and-replace operations.

Common uses

  • Build and verify a validation pattern for emails, phones, or IDs
  • Extract values from log lines using capture groups
  • Debug why a pattern matches too much or too little

Frequently asked questions

What do the g, i, m flags mean?

g (global) finds all matches instead of stopping at the first; i makes matching case-insensitive; m makes ^ and $ match at each line start/end; s lets the dot match newline characters.

Which regex flavor does this tester use?

JavaScript (ECMAScript) regex, as implemented by your browser. Most patterns are portable, but some syntax (like lookbehind or named groups) differs across languages — verify in your target language too.

Is my data uploaded to a server?

No. This tool runs entirely in your browser using JavaScript — nothing you type is transmitted, logged, or stored anywhere. You can even use it offline once the page has loaded.