Skip to main content

Home  /  Regex Tester

Regex Tester Online

Test regular expressions with live match highlighting — runs in a Web Worker with a timeout, so a runaway pattern can't freeze the page.

✓ Never uploaded — processed in your browser

Pattern

/ / g

Test string

Highlighted matches

Never uploaded

Matching happens entirely in your browser — your pattern and text never touch our servers.

Runaway-pattern safe

Matching runs in a Web Worker with a timeout, so a catastrophically slow pattern can't freeze the page.

Free, no limit

No account, and no limit on how many times you can use it.

Why Does This Run in a Web Worker?

Some regular expressions are pathologically slow on certain input — a problem called "catastrophic backtracking." A pattern like (a+)+$ tested against a long string of a's with no trailing match can take longer than the age of the universe to finish on a normal JavaScript engine, and if that ran on the page's main thread, the entire tab would freeze solid with no way to stop it. This tool runs every match attempt inside a Web Worker — a separate thread — with a timeout, so a pattern like that gets cut off cleanly with a clear message instead of locking up your browser.

How to Test a Regular Expression

  1. Enter your pattern. Type the regex itself (without the surrounding slashes) into the pattern field.
  2. Choose flags. Check g, i, m, s, and/or u as needed.
  3. Paste test text. Matches highlight instantly, with a list showing each match's position and captured groups.
  4. Try Replace mode (optional). Switch to Replace, enter a replacement using $1/$2 for groups, and see the result live.

Frequently Asked Questions

How does this tool protect against a pattern that never finishes?

Every match runs inside a Web Worker with a timeout, so a runaway pattern gets cut off instead of freezing the page.

Is my pattern or test text uploaded anywhere?

No. Matching runs entirely in your browser — nothing is sent to CurePDF's servers.

Is the regex tester free?

Yes, with no account required and no limit on how many times you can use it.

More PDF Tools