Developer Tools toolsUpdated July 2026

Free Regex Tester

Test a JavaScript regular expression, inspect capture groups, and preview replacements directly in your browser.

Free online tool No signup Direct download Browser-first privacy
AdvertisementTop tool sponsor space

Pattern

/ /

Matches

0 matches

Capture groups

Replacement result

AdvertisementBelow tool sponsor space

How to test a regex

  1. Type your regular expression and choose flags.
  2. Paste your test text.
  3. Review highlighted matches and capture groups, then optionally enter a replacement string to preview the transformed text.

Why use this private regex tester?

Your pattern and text stay in your browser, using the same JavaScript regex engine your code will run against.

Common use cases

  • Test a regular expression before using it in code
  • Check which parts of a string a pattern matches
  • Debug a regex that isn't matching as expected

Frequently asked questions

Is this regex tester free?

Yes, with no signup or watermark.

Is my text uploaded anywhere?

No. Matching runs entirely in your browser.

Which regex flavor does this use?

JavaScript's native RegExp engine — the same one your browser and Node.js use.

Can I see capture groups?

Yes. Each match's capture groups are listed below the highlighted text.

Can I test regex replacement strings?

Yes. Enter a replacement and preview JavaScript replacement syntax including $1 and named groups such as $.

What happens with an invalid pattern?

The tool shows a clear error message instead of a blank or broken result.