DevToolDeck
All tools

Regex Tester

Test regular expressions live

Everything runs locally in your browser. Your data never leaves your device.

About this tool

Write a JavaScript-style regular expression and test it against any string. Matches highlight live and capture groups are listed, with full control over flags like global, case-insensitive, and multiline.

Built for iterating on patterns for validation, parsing, and search-replace workflows, without leaving the browser.

How to use it

  1. Enter your regular expression and choose flags.
  2. Paste the sample text you want to test against.
  3. Review highlighted matches and capture groups.
  4. Refine the pattern until it behaves as expected, then copy it.

Common use cases

  • Prototype input validation patterns.
  • Extract structured fields from logs or CSV-like text.
  • Debug why a replace rule matches too much or too little.
  • Teach or document regex with live examples.

Frequently asked questions

Which regex flavor is this?

JavaScript (ECMAScript) regular expressions, matching browser behavior.

Is my text uploaded?

No. Matching runs locally.

Do flags work like in JS?

Yes. Flags like g, i, m, and other supported flags behave as in JavaScript.

Can I test replace?

Focus is on match and group inspection; use the pattern in your editor or code for replace.

What if the pattern is invalid?

You will see a syntax error from the RegExp engine so you can fix it.