Regex tester online
Test regular expressions in real time — highlighted matches, flags, capture groups and replace. Uses the JavaScript RegExp engine on your device.
Pattern
Enter a pattern and test text — results update instantly.
Samples:
Test string
Replace (optional)
Result after replace
—
Matches
No matches — adjust the pattern or test text.
How to use the Regex Tester
- Enter a pattern and choose flags (g, i, m…).
- Paste test text — see highlights and the list of matches.
- Optionally enter a replacement to see the replaced text.
What is a regex tester?
A regex tester lets you try a regular expression on sample text: see matches, capture groups (`$1`, `$2`…) and replace results — handy for validating emails and phone numbers or parsing logs.
Common flags
- g find all matches (global).
- i case-insensitive.
- m ^ and $ match per line.
- s / u dotAll (dot matches newlines) / unicode.
Runs on your device
The engine is the browser's JavaScript RegExp — same syntax as Node.js. Your text is never sent to a server.
Why use OneTool?
- Free — no sign-up required, no hidden fees.
- Private — many tools run right in your browser; files are never sent to OneTool's servers.
- Fast — drag and drop, preview, and download in a few steps.
Related tools
- Format JSON Beautify, minify and validate JSON — handy for debugging APIs.
- Base64 encode decode Encode/decode Base64 — Unicode, URL-safe, files and images with preview.
- URL encode decode Encode/decode URLs — encodeURIComponent, encodeURI, form (+), full UTF-8.
- UUID Hash Slugify UUID, SHA hashes, slugify, Unix timestamps — quick dev tools.
- Video to MP3 Extract audio from MP4, MOV or MKV as 192 kbps MP3 — runs in your browser.