Regex Tester
Build and debug a regular expression against your own text, and see what each part does.
- Your data never leaves your device
- 100% free
- No sign-up
- Works offline after first load
How to test a regular expression
- Type a pattern and choose the flags.
- Paste your test text — matches are highlighted and listed with their groups.
- Check Replace, Explain or Code, then copy what you need.
About Regex Tester
Test regular expressions live.
Everything works in your browser, so it is instant and private, and your settings are remembered on this device.
Good for
- Validating input such as emails and phone numbers
- Extracting data from logs and text
- Search-and-replace in code editors
Tip: Start from a pattern in the Common patterns list and adjust it to your data.
Frequently asked questions
Which regex flavour does it use?
JavaScript (ECMAScript), the same engine as Chrome and Node.js, with the g, i, m, s, u and y flags, lookbehind and named groups. The Code tab converts your pattern for Python, PHP, Java, C#, Go and Ruby.
What does the Explain tab show?
Every part of the pattern in plain English — character classes, groups, quantifiers and anchors — indented by group, so you can understand or debug a regex someone else wrote.
Why did my regex time out?
Patterns like (a+)+ can take exponentially long on some text (catastrophic backtracking). The tester runs your regex in the background and stops it after 2 seconds so the page never freezes.
Can I test replacements?
Yes — open Replace and use $1, $2 or named groups in the replacement to see the result instantly.
Is my data uploaded?
No. Everything is processed by JavaScript in your browser — nothing you paste or open is sent to a server, so it is safe for API responses, tokens, configs and customer data. It also works offline once the page has loaded.