Regex Tester
Test regular expressions with live match highlighting, capture groups, and replace — all in your browser.
100% in your browser — files never leave your device
How the regex tester works
Matching runs on the same RegExp engine your browser uses everywhere else — there's no custom parser standing between what you type and how it behaves. The pattern recompiles on every keystroke against all six JavaScript flags (g, i, m, s, u, y), and the preview highlights every match in the test string live.
Named capture groups — (?<name>...) — show up in the match list alongside numbered groups, and you can reference either in the replacement field: $1 for positional, ${name} for named. This mirrors exactly how String.replace() resolves them in real code, so what you build here is a direct copy-paste.
Because this is JavaScript's regex engine specifically, subtle behavior differs from PCRE, Python's re, or POSIX regex — lookbehind support, Unicode property escapes, and possessive quantifiers all vary by engine. If the pattern is headed for a different language or database, test it there too before trusting this preview completely.
Frequently asked questions
Is my test data sent anywhere?
No. All matching runs entirely in your browser using the native JavaScript RegExp engine. Nothing leaves your device.
Which flags are supported?
g (global), i (case-insensitive), m (multiline), s (dotAll — dot matches newline), u (unicode), and y (sticky). Combine them freely; the tool rebuilds the RegExp on every keystroke.
How do named capture groups work?
Use (?<name>...) syntax. Named groups appear in the match list alongside numbered captures. In the replacement input you can reference them as ${name}.
Related tools
How to use Regex Tester
Use the free tool above, or check the options on your device. No subscription or account is required for the browser tool.
Regex Tester in your browser
Free browser tool — no installation
- Enter a Pattern and Test string.
- Choose flags; optionally enter a Replacement using capture references.
- Inspect matches and the replacement output, then copy the result.
Uses JavaScript regular expressions. Expensive patterns on large input may stall the tab.
Processing happens on your device in the browser. Large files may exceed your device’s available memory.
Regex Tester on Mac
Free browser tool — no installation
Use the tool on this page in Safari, Chrome, or Firefox. These steps use the browser tool; they do not require an extra app.
- Enter a Pattern and Test string.
- Choose flags; optionally enter a Replacement using capture references.
- Inspect matches and the replacement output, then copy the result.
Uses JavaScript regular expressions. Expensive patterns on large input may stall the tab.
Processing happens on your device in the browser. Large files may exceed your device’s available memory.
For file tools, choose a copy of the original. Find saved results in your browser’s Downloads menu; your browser may ask where to save them. If processing fails, keep the original and try a smaller file or a desktop browser.
Regex Tester on Windows
Free browser tool — no installation
Use the tool on this page in Edge, Chrome, or Firefox. These steps use the browser tool; they do not require an extra app.
- Enter a Pattern and Test string.
- Choose flags; optionally enter a Replacement using capture references.
- Inspect matches and the replacement output, then copy the result.
Uses JavaScript regular expressions. Expensive patterns on large input may stall the tab.
Processing happens on your device in the browser. Large files may exceed your device’s available memory.
For file tools, choose a copy of the original. Find saved results in your browser’s Downloads menu; your browser may ask where to save them. If processing fails, keep the original and try a smaller file or a desktop browser.
Regex Tester on iPhone / iPad
Free browser tool — no installation
Use the tool on this page in Safari or another current browser. These steps use the browser tool; they do not require an extra app.
- Enter a Pattern and Test string.
- Choose flags; optionally enter a Replacement using capture references.
- Inspect matches and the replacement output, then copy the result.
Uses JavaScript regular expressions. Expensive patterns on large input may stall the tab.
Processing happens on your device in the browser. Large files may exceed your device’s available memory.
For file tools, choose Browse in the file picker to find a document in Files. A result may open in a preview; use Share → Save to Files when offered. If processing fails, keep the original and try a smaller file or a desktop browser.
Regex Tester on Android
Free browser tool — no installation
Use the tool on this page in Chrome or another current browser. These steps use the browser tool; they do not require an extra app.
- Enter a Pattern and Test string.
- Choose flags; optionally enter a Replacement using capture references.
- Inspect matches and the replacement output, then copy the result.
Uses JavaScript regular expressions. Expensive patterns on large input may stall the tab.
Processing happens on your device in the browser. Large files may exceed your device’s available memory.
For file tools, choose a document from the system file picker. Saved downloads are usually available in your browser’s Downloads menu or your file manager. If processing fails, keep the original and try a smaller file or a desktop browser.