Regex Tester

Regex Tester is a free developer tool that runs directly in your browser with no account required.

About this tool

Test a regular expression against sample text and see every match highlighted inline. The tester reports match count, indexes, and capture groups per match, and lets you download the full match list as JSON for use elsewhere.

How to use

  1. Type your expression in the Pattern field, without surrounding slashes.
  2. Add modifiers such as i, m, s, or u in the Flags field.
  3. Paste sample content in the Text field and review the highlighted preview and match list.
  4. Click Download matches to save match text, indexes, and groups as JSON.

Frequently asked questions

Which regex flavor does this use?

JavaScript's native RegExp engine, exactly as it behaves in the browser. Features like lookbehind and named groups work where your browser supports them, but PCRE- or Python-specific syntax may not.

Do I need the g flag to see all matches?

No. The tool adds the global flag automatically so every match is found and highlighted, even if you leave Flags empty.

Are capture groups shown?

Yes. Each row in the match list shows the matched text, its character index, and the values of any capture groups, and the same data is included in the JSON download.

Can a pattern hang the page?

Certain patterns with heavy backtracking can be slow on large inputs, since evaluation runs in your browser's regex engine. Keep test text modest while iterating on a tricky pattern.

What happens with zero-length matches?

The tester advances past empty matches instead of looping forever, so patterns like a* or lookaheads are safe to test.

Is my test data kept private?

Yes. Pattern matching runs entirely in your browser; neither the pattern nor the text is uploaded anywhere.

Related tools