Developer tool

Regex Tester

Test a JavaScript regular expression against your text: every match is highlighted with its capture groups, and pattern errors are explained. Free and local.

Your file never leaves your device.

Runs locally in your browser

Your text is not uploaded.

Simple steps

How it works

  1. 01

    Enter a regular expression and the text to test.

  2. 02

    Choose flags such as global, case-insensitive, or multiline.

  3. 03

    Review match highlighting and capture groups.

How matches are reported

The tester uses your browser's JavaScript regular expressions. With the global flag it lists every match and the position where it starts; without it, only the first match. Positions count from 0 in UTF-16 code units, the way JavaScript counts string length, so an emoji usually counts as 2.

Flags: i ignores case, m makes ^ and $ match at every line, s lets . match a line break, and u enables full Unicode, which you need for \p{L} (any letter) or for treating an emoji as one character.

An example

The pattern \b\d{4}-\d{2}-\d{2}\b with the global flag finds dates such as 2026-10-29 in text. Add groups to capture parts, for example (\d{4})-(\d{2})-(\d{2}). This pattern checks the format only: it would also accept 2026-13-45, so validate real dates separately.

Limits and slow patterns

Patterns can be up to 500 characters and test text up to 200,000 characters. Nested repetition such as (a+)+ can take an extremely long time on text that almost matches, because the engine tries every combination; this is called catastrophic backtracking. Prefer specific character classes, such as [^,]* instead of .*, when a pattern has to scan long text.

Good to know

Frequently asked questions

Which regex flavor is used?

The tester uses JavaScript RegExp syntax supported by your browser.

Can I see multiple matches?

Enable the global flag to find and highlight every match.

What happens with an invalid pattern?

The browser’s syntax error is displayed beside the tester instead of running the expression.

Can a pattern hang the page?

Patterns run in the browser; avoid catastrophic backtracking patterns on very long input.

Is test text sent online?

No. Matching runs locally in your browser.