Free tool · runs in your browser

Regex Tester

Write a pattern, paste text, and see every match, capture group and replacement without sending anything to a server.

What the output shows

Matches are highlighted in the preview and listed with their start index and capture groups. The flags row controls global, case-insensitive, multiline, dot-all and Unicode behaviour, and changing any of them re-runs the pattern immediately. The replacement field uses JavaScript replacement syntax such as $1 and $&.

Indices are UTF-16 code unit offsets, matching JavaScript's own String.prototype.indexOf. A zero-width match is counted and marked, but it consumes no characters, so the tester advances by one to keep scanning.

Engine and safety

Patterns run in the browser's JavaScript engine, which supports lookbehind and named groups but not possessive quantifiers or atomic groups. A pattern that works here may fail in Python, and one that works in PCRE may mean something different here.

Because the engine backtracks, a pathological pattern can freeze the tab. Keep test input short when trying nested quantifiers, and read the catastrophic-backtracking entry before shipping a user-supplied pattern to a server.

Frequently asked questions

Which regex engine does this tester use?

The JavaScript engine of your browser, following ECMAScript syntax.

Why does a pattern behave differently in Python?

Engines differ on lookbehind length, Unicode classes, possessive quantifiers and replacement syntax. The tester follows JavaScript.

Is my test text uploaded?

No. Matching happens locally in the page; the text is never sent to a server or stored.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.