Free Online Regex Tester

Test regular expressions with real-time matching.

/ /

Enter a pattern and test string to see matches

About the Regex Tester

This free online regex tester lets you write and debug JavaScript regular expressions in real time. As you type your pattern and test string, matches are instantly highlighted with full details — including captured groups, match positions, and index offsets.


All processing runs entirely in your browser using the native JavaScript RegExp engine. No data is sent to any server, making this tool ideal for testing patterns against sensitive text. Toggle flags like global, case-insensitive, multiline, dotall, and unicode with a single click.

How to Use the Regex Tester

  1. Enter Pattern: Type your regular expression in the pattern field.
  2. Set Flags: Click flag buttons or type flags directly (g, i, m, s, u).
  3. Add Test String: Paste or type the text you want to match against.
  4. View Results: Matches highlight instantly with group details below.

Common Regex Patterns

  • Email: [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
  • URL: https?:\/\/[^\s]+
  • IP Address: \b\d{1,3}(\.\d{1,3}){3}\b
  • Phone: \(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}