Skip to content
Developer Tools

Regex Tester

Test a regular expression against sample text locally, with visible flags, matches, capture groups, and a time limit.

Local regex testing. The expression runs in a separate browser worker. Your pattern and sample text are not uploaded or fetched.

0 / 500 pattern characters

Flags

0 / 100,000 sample-text characters

One-second limit. Some regular expressions can take a long time on certain text. The page stops a test that exceeds one second, so the rest of the interface remains usable.

Data handling

Storage and export controls

Retention
The tool's working state is kept only while this page is open. Inputs and results are not saved to persistent storage by Got A Tool.
Export
The tool may prepare a result after you run it. It downloads or copies it only when you choose that action.

Advertising and analytics are separate site services. We do not send selected tool input to them. Read the Privacy Policy for details.

How it works

Test pattern behavior without sending sample text away

01

Enter a pattern

Paste the expression without slash delimiters, then select only the flags you intend to use.

02

Use representative text

Add sample input that includes expected matches and a nearby non-match.

03

Review captures

Check each matching value, its starting index, and any capture groups before using the pattern elsewhere.

Clear limit

A timeout is a stop, not a verdict.

The expression runs away from the main page interface and is stopped after one second. A timeout means the test did not finish within that limit. It does not prove that the pattern is invalid or safe for every possible input.

Local worker

Pattern and sample text remain in the browser.

Visible flags

The selected JavaScript flags are always shown.

Capture groups

Each reported match lists numbered capture values.

Bounded results

The page shows at most 500 matches for a readable review.

FAQ

Common questions

Should I include slash characters around my expression?

No. Enter the pattern only, then choose flags from the visible controls.

Why did my test stop after one second?

Some patterns have expensive behavior on particular text. The worker was terminated to keep the page responsive.

Does this test another regex engine?

No. It uses the browser's JavaScript regular-expression behavior. Other languages and tools may interpret expressions differently.

Keep working