← All tools

🔎 Regex Tester

Test JavaScript regular expressions with live match highlighting — runs in your browser

/ /
Test text0 matches
🔄 Replace (optional)
$1@$2" oninput="run()">
Email\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b
URLhttps?:\/\/[^\s]+
US Phone\d{3}[-.]?\d{3}[-.]?\d{4}
IPv4\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b
Date YYYY-MM-DD\d{4}-\d{2}-\d{2}
HEX color#[A-Fa-f0-9]{6}\b

What is a regex tester?

A regex tester lets you build and debug regular expressions interactively. You type a pattern, paste some sample text, and the tester instantly highlights every match — plus shows the capture groups, named groups, and the index of each hit. Instead of writing code, running it, and squinting at console output, you get immediate feedback as you tune the pattern.

When to use a regex tester

Common use cases: building a validation pattern for emails, phone numbers, or postal codes; extracting structured data from logs or scraped text; debugging an existing regex that misbehaves on edge cases; learning regex syntax with quick experiments; building search-and-replace patterns for code editors and shell scripts.

Flags quick reference

g — global, find all matches instead of stopping at the first. i — ignore case. m — multiline, ^ and $ match line breaks. s — dotall, . also matches newlines. u — unicode, enables full Unicode support including emoji and surrogate pairs.

Why use FileTools Regex Tester?

✅ Free — no signup, no spam
✅ 100% private — pattern and text never leave your browser
✅ Live highlighting of all matches
✅ Capture groups and named groups detailed
✅ Replace mode with $1, $2 backreferences
✅ Common pattern shortcuts (email, URL, phone, IP, date, hex)

Frequently Asked Questions

Which regex flavor does this tool use?

JavaScript (ECMAScript). Same engine as Node.js and browsers. Patterns work mostly identically in Python, PHP, and Java with minor syntax differences.

What do the flags mean?

g = global (all matches), i = case-insensitive, m = multiline, s = dotall (. matches newlines), u = unicode.

How are capture groups shown?

Each match is listed with its full text and every numbered or named capture group. Groups that did not participate appear as undefined.

Is my regex sent to a server?

No. Everything runs in your browser. Pattern and text never leave your device.

What about catastrophic backtracking?

Some patterns can take exponential time. If your pattern hangs the browser, simplify it — nested quantifiers like (a+)+ are common culprits.

☕ Support FileTools

Enter any amount in USD and click PayPal to donate