Skip to content
PrivateDevTools
100% Local — Your data never leaves your browser

Regex Tester

Test JavaScript regular expressions against sample text instantly in your browser with match highlighting.

Flags

Evaluating…

Highlighted 0 matches
Ada wrote the first algorithm.
Grace built the first compiler.
Linus built a kernel and Ada wrote notes.
Matches

No matches.

Replace

Enter a pattern to preview replacement. An empty replacement removes matches.

How it works

Regular expressions are patterns compiled by the JavaScript RegExp engine. This tester constructs a RegExp from your pattern and flags, then runs it against the sample text to list matches, capture groups, and indices. Highlighting helps you see what the engine consumed. Matching and replacement run in a local background worker with a one-second timeout, so excessive backtracking can be stopped without freezing the page. Results use your browser’s ECMAScript engine, including lookarounds where supported. No text is transmitted. The tester shows up to 1,000 matches and limits input and replacement sizes to keep previews responsive. An empty replacement removes matched text. Prefer explicit flags and small representative samples.

Frequently asked questions

Which regex flavor is this?

JavaScript/ECMAScript via the browser RegExp engine—the same flavor used in most web apps.

Can I use multiline or dotAll flags?

Yes. Toggle standard flags such as g, i, m, s, and u from the interface.

Does my test string get uploaded?

No. Matching runs entirely client-side for privacy-sensitive samples.

Why was my expression stopped?

Matching and replacement are stopped after one second to prevent excessive backtracking. Simplify the expression or shorten the test text and retry.