Test JavaScript regex patterns instantly.

Write a regular expression, choose flags, paste test text, and inspect live matches, indexes, capture groups, highlighting, and replacement output in your browser.

Debug regex matches See every match, index, and capture group without guessing where the pattern works.
Preview replacements Test replacement strings before running them in code, editors, or data cleanup tasks.
Learn JavaScript flags Toggle global, ignore case, multiline, dotAll, unicode, and sticky flags.
Flags
Results No pattern yet
0matches
0groups
/ /regex

Highlighted text

Matches will appear here.

Match details

No matches yet.

A practical JavaScript regex tester for quick debugging.

Regular expressions are easier to reason about when you can see every match and capture group. This tool uses the browser's JavaScript RegExp engine, so it is useful for frontend code, Node.js snippets, form validation, text cleanup, and editor replacement patterns.

Live match inspection

See match text, start index, end index, and capture groups for each result.

Replacement preview

Try replacement strings with `$&`, `$1`, `$2`, and other JavaScript replacement syntax.

No server round trip

Patterns and test text are evaluated locally in your browser for quick private checks.

Regex engine note.

This tester uses JavaScript regular expressions. Syntax and behavior may differ from PCRE, Python, Ruby, Java, .NET, grep, or database regex engines. If you are debugging a production regex, test it in the same language or runtime before shipping.

regex tester online javascript regex tester regular expression tester regex replace tester capture group tester no-upload regex tool

FAQ

How do I test a regex online?

Enter a pattern, choose flags, paste test text, and inspect highlighted matches, indexes, and capture groups.

Which regex flavor is supported?

This tool uses JavaScript RegExp syntax and behavior because it runs directly in your browser.

Does it support capture groups?

Yes. Match details show numbered capture groups for each match when your pattern includes them.

Can I test replacement strings?

Yes. Enter replacement text and the tool shows the JavaScript replacement output.

Is my test text uploaded?

No. Regex testing happens locally in the page. The tool does not need a backend to evaluate matches.

Why does my regex behave differently elsewhere?

Different languages have different regex engines. Always test important patterns in the runtime where they will be used.