Webmaster Utilities · Runs in your browser · Free

Regex Tester

Test JavaScript regular expressions against text and list every match with its groups.

What this tool does

Runs a regular expression over your text and lists each match with position, text and capture groups, useful for URL patterns, redirects and log filters.

Who should use it

Developers and SEOs writing redirect rules and log or Search Console filters.

How it works

The pattern is compiled with the browser's RegExp engine; matches are collected with exec in a loop that guards against zero-length infinite loops and caps output at 1,000.

How to use it

  1. Enter or paste pattern in the form.
  2. Adjust the options below the main box if you need to; the defaults suit most cases. Use "Load example" to see how input should look.
  3. Press the run button. Processing happens instantly in your browser.
  4. Review the result panel, then copy or download the output if the tool offers it. Use Reset to start over.

Practical example

Pattern (\d{4})-(\d{2}) on "2026-05" returns group 1 = 2026, group 2 = 05.

Understanding the results

Syntax errors are shown with the engine's message.

Limitations

JavaScript syntax only; PCRE, Apache and Nginx flavours differ. Patterns with heavy backtracking can freeze the tab.

Accuracy and report transparency

Results are computed in your browser from exactly what you enter. Deterministic steps (counting, parsing, encoding, validation) are verified by an automated test-suite with known answers. Where a method is a heuristic, the result panel says "estimated". No external data is used and nothing is invented.

Privacy

Your input never leaves your device for this tool. We count anonymous events (tool opened, run, copied) without storing what you typed. See the Privacy Policy.

Try these next

Frequently asked questions

Can I use this for .htaccess rules?

Basic patterns usually work the same, but Apache uses PCRE, so test there too.

Is my data sent to your server?

No. This tool runs entirely in your browser, so the text or files you enter stay on your device. We do record anonymous counts of how often each tool is opened or run (no input data) to see which tools are useful.

How accurate are the results?

Counting, parsing, encoding and validation steps are deterministic and covered by automated tests with known answers. Anything based on a heuristic is labelled "estimated" in the result panel.

Is this tool really free?

Yes. There is no account, limit or paid plan. The site is supported by advertising, which is disclosed on our Advertising Disclosure page.

References