RegEx Tester
Runs locally in your browser. Nothing leaves your device.Test JavaScript regular expressions locally, inspect matches and capture groups, and preview replacements.
Pattern and text
The tester uses native JavaScript/ECMAScript RegExp semantics. Other engines can behave differently.
A successful test does not prove a regular expression is fast for large or hostile inputs.
Matches
Enter a pattern and test text.
Test suite
Match/No-Match-Fälle lokal ausführen.
How it works
- 1
Enter the pattern and test text
Enter a pattern, flags, and test text, or import a literal.
- 2
Choose the mode
Switch between match search, replace preview, or test suite.
- 3
Copy or download the result
Copy matches, the replace result, or the test suite result, or download them as a file.
Good to know
The regex tester checks regular expressions directly in your browser in three modes: match search, replace preview, and a test suite with multiple test cases. Execution runs in a worker with a configurable timeout, so a problematic pattern doesn't block the interface.
The tester uses native JavaScript/ECMAScript RegExp semantics; other engines may behave differently. Important: a successful test does not prove that a regular expression stays fast for large or malicious inputs — the timeout only protects the interface, not production systems, against ReDoS.
Typical use cases
Pre-test replacement text with backreferences
Switch to replace mode to check a replacement pattern with JavaScript backreferences against real sample text before using it in code.
Validate a regex against multiple cases with a test suite
Add multiple positive and negative test cases in the test suite to ensure a pattern matches neither too broadly nor too narrowly.
Tips for better results
Don't mistake the timeout for ReDoS safety
A successful test in the tool doesn't prove the same pattern stays fast in production with large or malicious inputs — test performance separately.
Use literal import for copied code
Import a complete /pattern/flags literal from existing code, instead of manually separating pattern and flags.
Features
Three modes
Match search, replace preview, and a test suite with multiple test cases.
Worker with timeout
Execution runs in a worker with a limited runtime, so the interface stays responsive.
Local processing
Your test data never leaves your device; evaluation runs entirely in the browser.
Frequently asked questions
Does the regex behave the same as in other languages?
Not necessarily. The tester uses native JavaScript/ECMAScript semantics; other regex engines can react differently to the same patterns.
Is my test data uploaded?
No. Evaluation runs entirely locally in the browser.
More tools
Looking for another tool?
Every tool runs locally in your browser – no sign-up, no upload, and it works offline.