Regular expression tester

What this tool does

Explore JavaScript expressions without running them on the interface thread. A new worker limits the impact of expensive patterns.

When to use it

Use Regular expression tester when you need the specific operation described here and can check the result against your own source. Keep the original and work on a copy.

Steps

  1. Enter a pattern without delimiter slashes and your test text.
  2. Set flags such as g or i.
  3. Process, review indices/groups and cancel or reduce the input if it times out.

Worked example

Input: Pattern (a+) with g flag; text baa.

Expected result: Match aa at index 1 with captured group aa.

Common mistakes

  • Pattern 2,000 characters, text 100,000, 500 matches and one second per job.
  • Flags depend on the browser. Indices use UTF-16 units. Does not validate patterns for other regex engines.

If an error appears, reduce the input or correct the specified field. Do not treat an unsuccessful operation as a valid result. Repeat the example with synthetic data to separate an input problem from a tool problem.

Limitations and privacy

Inputs are processed in your browser. Visiting the site downloads its resources, but the tool does not upload the document or text. Results are not automatically stored. Check downloaded files before using them in a workflow.

Do not paste production secrets on an untrusted device. Local processing does not replace validation in the destination application.

Frequently asked questions

Does this change the original?

No. Keep the source and explicitly download or copy the result you want to retain.

What should I check before using the output?

Match aa at index 1 with captured group aa. Pattern 2,000 characters, text 100,000, 500 matches and one second per job.

Try it

Regular expression tester

Technical reference

MDN: JavaScript regular expressions