Skip to content
100% Local — never leaves your browser
Updates as you type

Regex Tester

Test regular expressions against sample text instantly in your browser, with live-highlighted matches.

//g

Enter a pattern to test it against the string below.

How to use this tool

Enter a pattern and choose which flags to apply, then paste or type a test string. As soon as the pattern is valid, a plain-English "Pattern breakdown" walks through what each piece of it does. Matches are highlighted in the test string as you type, with a breakdown of each match's position and capture groups below. Invalid patterns show a clear error message.

FAQ

Is this regex tester free to use?

Yes, this tool is completely free to use with no limits on how often you can use it.

Does my pattern or test string get uploaded anywhere?

No. Matching happens directly in your browser using JavaScript's built-in regular expression engine. Nothing is sent to a server.

What do the g, i, m, and s flags do?

g finds all matches instead of just the first. i makes matching case-insensitive. m makes ^ and $ match the start/end of each line instead of the whole string. s ("dotall") makes . also match newline characters.

What is the "Pattern breakdown" section?

It splits your pattern into its individual pieces — literal text, character classes, groups, quantifiers, and so on — and explains each one in plain English, so you can see exactly what a pattern does without mentally parsing the raw regex syntax.

Related Tools