Regex Tester

Test JavaScript regular expressions with live match highlighting and groups.

Tool

Was this tool useful?

About this tool

About Regex Tester

Write and debug regular expressions with instant feedback on matches and capture groups.

How it works

Uses the browser’s JavaScript RegExp engine (ECMAScript). Flags: g, i, m, s, u, y.

Example

Pattern \d{3}-\d{4} matches “555-1234” in a line of text.

How to use this tool

  1. Enter your pattern and flags.
  2. Paste your test text.
  3. See matches highlighted and groups listed.

Frequently asked questions

Why does my regex freeze?

Some patterns cause heavy backtracking. The tool stops after 10,000 matches to stay responsive.

Is this the same as PHP or Python regex?

Mostly, but some features differ. Test in your target language too.

Does the Regex Tester send my data to a server?

No. The Regex Tester runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.