Free · No signup · Runs entirely in your browser

Regex Tester

Type a pattern and a test string and see every match, capture group, and named group highlighted as you type. Matching runs locally in your browser — nothing you enter is sent anywhere.

How it works

  1. Type a regular expression pattern and toggle the flags you need.
  2. Paste or type the text you want to test it against.
  3. Matches are highlighted live, with a list of captured groups below.
  4. Optionally add a replacement string to preview the result of a replace.

Frequently asked questions

What regex flavor does this use?

It uses JavaScript's built-in RegExp engine — the same one that runs in your browser's console — so patterns behave exactly as they would in your own JavaScript code.

What do the flags mean?

g matches every occurrence instead of stopping at the first, i ignores case, m makes ^ and $ match line boundaries, s lets . match newlines, u enables full Unicode mode, and y anchors matching to the current position (sticky).

Is my text uploaded anywhere?

No. Your pattern and text are matched entirely locally in your browser using JavaScript — nothing is sent to a server.

Why is my pattern invalid?

JavaScript's RegExp constructor throws a SyntaxError for things like unbalanced parentheses, invalid flag combinations, or unsupported escape sequences — the exact error message is shown so you can fix it.

Does it support capture groups?

Yes — both numbered groups like (\d+) and named groups like (?<year>\d{4}) are supported, and each match lists its captured groups below the highlighted text.