Test JavaScript regular expressions online with live match highlighting and flags. See every match in your sample text. Free regex tester for developers.
On this page
About this tool
Test JavaScript regular expressions against sample text and inspect matches.
How to use Regex Tester
Enter the expression between the displayed slash delimiters.
Choose flags such as global, ignore case or multiline and paste Test string.
Review Highlighted matches, match totals and Match details.
Worked example
Try a short digit-matching pattern on text containing two numbers, then toggle the global flag.
Will this match another regex engine exactly?
Not necessarily. Syntax and Unicode handling vary by language; this tool uses the browser’s JavaScript engine.
Can a pattern freeze the browser?
Very complex or backtracking-heavy patterns can be slow. Test a small sample before increasing input size.
Regex Tester — Test regular expressions with live match highlighting and groups.
Explore Coding Tools · More practical guides
Personalize your experience. Open with Ctrl+U (Option+U on Mac). Preferences stay in this browser when storage is available.
Menu language English (USA) Español اردو
Accessibility Profiles Custom settings Vision support Reading support Reduced motion Motor support Focus support
Oversized widget
Screen Reader
Contrast +
Smart Contrast
Highlight Links
Bigger Text
Text Spacing
Pause Animations
Dyslexia Friendly
Cursor
Tooltips
Page Structure
Line Height
Text Align
Dictionary
Saturation
Read aloud assistance Uses browser speech voices to read page text or selected text. This is not a replacement for NVDA, VoiceOver or another full screen reader. Available voices and speech processing depend on your browser and device.
Read page Read selection Pause / resume Stop reading
Reset All Accessibility Settings Move / Hide Widget Widget positionBottom right Bottom left Hide widget for 1 hour Restore at any time with Ctrl+U (Option+U on Mac).
Accessibility statement and help