Skip to main content

Regex Tester

Test a regular expression against sample text online for free, with live match highlighting, capture groups, and flag support. Nothing sent to a server.

//

Flags

Contact us at hello@example.com or support@example.org for help.

Your files are processed locally in your browser and are not uploaded to our servers.

How to use Regex Tester

  1. 1

    Type or paste a regular expression pattern — no need to add the surrounding slashes.

  2. 2

    Toggle flags like case-insensitive or multiline as needed.

  3. 3

    Type or paste sample text — matches highlight instantly as you type.

  4. 4

    Check the match details list below for each match's position and captured groups.

Common uses

  • Building and debugging a regex before dropping it into code
  • Checking whether a pattern matches real sample data, including edge cases
  • Understanding what a regex found in a chunk of text, including capture groups

Supported formats and limitations

Accepts text, up to one file at a time.

  • Uses your browser's native JavaScript regex engine — patterns rely on JavaScript regex syntax, which differs in some details from PCRE, Python, or other regex flavors.
  • A pathological pattern with catastrophic backtracking can make matching slow or freeze this tab, the same way it would in any JavaScript environment — there's no execution timeout.

Frequently asked questions

No. Matching runs entirely in your browser using JavaScript's native RegExp — nothing is sent to a server.

No — just type the pattern itself. The slashes shown around the input are just a visual reminder of the flags applied.

Case insensitive (i), multiline (m), dot-matches-newline (s), and unicode (u). Matches are always found globally so every occurrence is shown, not just the first.

The pattern isn't valid JavaScript regex syntax — the error message shown is the browser's own explanation of what's wrong (e.g. an unterminated group or invalid flag combination).

Related tools