Regex Tester
Test JavaScript regex patterns live: matches, groups, and indices.
Browser onlyYour data never leaves this device.
Runs entirely in your browser. Your pattern and text never leave this device and are never stored.
Details: Privacy policy
Input
JavaScript RegExp source, without slashes.
Letters only: d g i m s u v y.
Runs on demand. Data only, never code.
Result
No result yet.
Fill the fields above and press Test regex.
Regex Tester runs a JavaScript regular expression against your test text and shows every match with its capture groups and their indices, which is the detail that decides whether a pattern is actually doing what you meant. Indices matter because a pattern that matches the right text in the wrong place is a pattern that will break on real input. Matching stops at a thousand matches so a greedy expression cannot flood the page, the test text is capped at two hundred thousand characters, and a runaway pattern is terminated after eight seconds in a background worker rather than left to spin. The engine is JavaScript's own RegExp, and only that: other flavours behave differently, and the page does not pretend to emulate them. It is the tool for verifying a ticket-code pattern against sample lines before it goes into production, for inspecting capture groups while building a parser, and for confirming that tightening a pattern did not quietly stop matching what it used to. Nothing is uploaded and nothing is stored. Matching stops after a thousand hits and a runaway pattern is terminated after eight seconds in a background worker, which keeps a catastrophic backtrack from freezing the tab.
How to use Regex Tester
- Enter a pattern, flags, and test text.
- Run the match and read matches, groups, and indices.
- Copy the summary or clear to start over.
What you get
- Every match with its capture groups and their indices in the test text.
- A match ceiling of 1,000, so a greedy pattern cannot flood the page.
- Termination of a runaway pattern after eight seconds in a background worker.
When to use Regex Tester
- Verify a ticket-code pattern against sample lines before using it anywhere.
- Inspect capture groups and indices for a parsing pattern under test.
- Confirm that a pattern still matches after you tighten it, by running both versions against the same sample lines.
Frequently asked questions about Regex Tester
Does the regex tester upload my text?
No. Compiling and matching run locally in your browser — heavy patterns in a background worker on this device; nothing is sent, stored, or logged.
Is eval used anywhere?
No. Patterns compile through the RegExp constructor only. Test text is data, never code, and nothing is ever executed.
What happens with a catastrophic pattern?
Matching runs off the main thread with an 8-second timeout and a cancel button. Runaway backtracking is terminated with a clear timeout message.
Why do I see zero-width matches?
Lookarounds and anchors match empty positions. They are listed with their index and marked zero-width so they are never mistaken for content.
Tools related to Regex Tester
- Regex Visualizer & Explainer
An interactive regex visualizer and explainer to inspect syntax tokens, test patterns in real time, and debug regular expressions locally.
- Find and Replace Text — replace every occurrence of text or a regex pattern
Replace every occurrence of text or a regex pattern, with a match count.
- Base64 Encoder & Decoder
Encode text to Base64 and decode it back with Unicode fidelity.
- CSS Formatter & Minifier — indent tangled stylesheets or minify them while
Indent tangled stylesheets or minify them while keeping licenses intact.
- URL Encode/Decode
Percent-encode or decode strings with full Unicode support.
- UUID Generator — generate cryptographically secure UUIDs (v4 random
Generate cryptographically secure UUIDs (v4 random, v7 timestamp-based).
Free Software Alternative Comparisons:
⚡Embed Regex Tester on Your Site & Get Badge↓
Embed this in-browser tool into any blog, documentation, or dashboard. Includes an optional dofollow backlink badge to credit Tools Hub.
<iframe src="https://salaq.com/embed/developers/regex-tester" title="Regex Tester — Tools Hub" width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden;max-width:100%;" loading="lazy"></iframe>
<p style="font-size:12px;color:#6b7280;margin-top:6px;font-family:system-ui,-apple-system,sans-serif;">Powered by <a href="https://salaq.com/tools/developers/regex-tester" target="_blank" rel="noopener" style="color:#2563eb;text-decoration:underline;">Regex Tester on Tools Hub</a></p>Feedback
Send feedback about this tool (placeholder — feedback collection is not wired up yet).