Home › Developer Tools › Regex Tester
Regex Tester
Test regular expressions live with match highlighting, groups and flags.
Free Online Regex Tester — Test Regular Expressions Instantly
Regular expressions are one of the most powerful text-processing tools available to developers, but they're also notoriously tricky to write correctly. A regex that looks right in your head often behaves differently against real data. That's why having a fast, visual tester is so valuable — you can see exactly which parts of your text matched, which didn't, and where the boundaries land.
This tool evaluates your regex using JavaScript's native RegExp engine, so the results are accurate for use in any JavaScript or TypeScript project. Matches are highlighted directly in the test string — orange marks show exactly what was captured — and the match table below shows each hit with its character position and any captured groups.
Flags change how the regex behaves. The g flag (global) finds all matches instead of stopping at the first. i makes matching case-insensitive. m (multiline) changes how ^ and $ work, matching the start and end of each line rather than the whole string. s makes . match newlines too. u enables full Unicode support.
Built-in examples cover the most common use cases: email validation, URL matching, IP addresses, US phone numbers, hex colors, and date formats. Click any of them to load the pattern instantly and see how it works against your test string.
Capture groups are shown in the match table when your pattern uses parentheses. If your regex includes (groups), you can see exactly what each group captured from each match — useful for extracting specific parts like domain names from URLs or area codes from phone numbers.
If your regex has a syntax error, the tool shows the exact error message from the JavaScript engine so you can fix it quickly. All processing happens in your browser — no requests, no logging, safe to paste private data.