Text Tools: JSON Formatter Base64 URL Encoder JSON to CSV CSV to JSON Word Counter Case Converter UUID Generator Timestamp Converter Lorem Ipsum JWT Decoder Markdown to HTML Password Generator Hash Generator Percentage Calculator Age Calculator Text Diff Checker Regex Tester BMI Calculator Color Contrast Checker Text to Speech Text Encryption Slug Generator Random Number Tip Calculator JSON to XML

Free Regex Tester

Test JavaScript regular expressions live with highlighted matches | 100% Private

Regex Tester

/ / g
Flags:
Common Patterns:
No matches yet. Enter a pattern and a test string above.

Live As You Type

Matches update instantly (debounced) as you edit the pattern, flags, or test string.

Highlighted Matches

Every match is visually highlighted directly inside your test string for instant feedback.

Capture Groups

See each match's index and every numbered capture group broken out clearly.

Safe Error Handling

Invalid regex syntax shows a clear message instead of crashing or blanking the page.

Quick-Start Patterns

One-click examples for email, URL, phone number, and date formats to get you going fast.

100% Private

All matching runs locally in your browser — nothing is ever sent anywhere.

The Complete Guide to Testing Regular Expressions

Regular expressions are powerful but notoriously easy to get subtly wrong. This tester lets you see exactly what your pattern matches against real text, in real time, using the same JavaScript RegExp engine that runs in browsers and Node.js — so what you see here is exactly what you'll get in your code.

Why UtilityX is Different

  • ✅ True JavaScript RegExp Engine
  • ✅ 100% Free Forever
  • ✅ Zero Server Uploads
  • ✅ Live Match Highlighting
  • ✅ Unlimited Daily Use
  • ✅ No Account Needed

Understanding Flags

The g (global) flag finds every match in the string instead of stopping at the first one. i makes matching case-insensitive. m (multiline) changes ^ and $ to match the start and end of each line. s (dotall) lets the dot (.) match newline characters too, which it normally does not.

Reading Capture Groups

Parentheses in a pattern, like (\d{4})-(\d{2})-(\d{2}), create numbered capture groups. Each match below lists its full matched text plus every group it captured, so you can quickly confirm your grouping logic extracts exactly the pieces you expect.

Frequently Asked Questions

Which regular expression flavor does this tester use?

This tool uses your browser's native JavaScript RegExp engine, so the syntax and behavior exactly match what you'd get running new RegExp() in Node.js or in-browser JavaScript.

Is my pattern or test string sent to a server?

No. Matching happens entirely in your browser using JavaScript's built-in RegExp object. Nothing you type is ever transmitted, logged, or stored anywhere.

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

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

What happens if I type an invalid regular expression?

The tool catches the syntax error safely and shows a clear inline error message describing what's wrong, without crashing the page or leaving it blank.

Can I see capture groups from my matches?

Yes. Every match is listed below the test string along with its index and any numbered capture groups it contains, so you can verify your grouping logic at a glance.