Tools / Regex Tester

Regex Tester

Test JavaScript regular expressions locally. Inspect matches, capture groups and optional replacements with safety caps against runaway patterns.

Limits: pattern 500 chars, test 100000 chars, 1000 matches, short time budget per run.

Flags

0 / 100,000

Frequently asked questions

Is my text uploaded to a server?

No. Testing runs entirely in your browser. Nothing is sent or stored on a server.

Which flags are supported?

g (global), i (ignore case), m (multiline), s (dotAll) and u (unicode). Unsupported flag characters are ignored.

How do you limit risky patterns?

Pattern and test length are capped, match collection stops at 1,000 hits and a short time budget applies while iterating matches. Catastrophic patterns can still hang the tab briefly — keep patterns simple when testing untrusted input.

How does replace work?

The replacement field uses JavaScript String.replace syntax, including $1-style group references. With the g flag, all matches are replaced; without it, only the first match is.

Let's build something you're proud of

I help businesses launch, optimize and maintain their online presence, from code to SEO.

Let's talk

Related tools