Regex tester

Tests a regular expression against sample text, run in a background worker with a time budget so a runaway pattern can never freeze this page.

1 · Pattern

2 · Test text

Matching runs in a Web Worker with a time budget - a pattern that runs too long is terminated and flagged as a potential catastrophic-backtracking risk. This is a runtime safeguard, not proof any given pattern is ReDoS-safe. Nothing is sent to a server.


What this does

Runs your pattern against test text with match highlighting, capture groups, match index, and an optional replace preview, plus a few common example patterns to start from.

Cannot freeze the page

Matching runs in a Web Worker - a separate thread from the page itself - under a fixed time budget. A pattern that does not finish in time is terminated and flagged as a potential catastrophic-backtracking risk. This is a runtime safeguard against a genuinely bad experience, not a proof that any given pattern is provably safe from ReDoS - a pattern that finishes quickly on today's test text could still behave differently on other input.

Privacy

Matched entirely in your browser - nothing is sent to a server.

Rate this tool

Was this tool useful? Your feedback helps us improve it.

No ratings yet — be the first to rate this tool.
Your rating (required)
0 / 2000

Please do not include passwords, payment details or other sensitive information.

Your feedback is sent privately to the A2Z.Tools team and will not be posted publicly.

Add this tool to your website. Free, responsive, no ads, no sign-up - copy one line of code.

Embed this tool