- Home
- Developer
- Regex Tester
Regex Tester
Test regular expressions with live matches, replacement, split and token-by-token explanation.
The Regex Tester runs a regular expression against sample text in Match, Replace and Split modes, shows every match, capture group and position, and explains each pattern token. It is useful while building search patterns for validation, transformation and data extraction.
Mode
Common patterns
Regex explanation
0 matches
Total matched: 0 chars
Input length: 0 chars
How to use
- Choose Match, Replace or Split mode.
- Enter a regular expression and toggle flags such as g, i, m, s, u or y.
- Paste sample text and review highlighted matches, output and the token-by-token explanation.
Frequently asked questions
Is the regex evaluated securely?
Patterns run inside the JavaScript RegExp engine and can only access the text you enter.
How does replacement mode work?
Replacement follows JavaScript semantics: $1 and ${name} reference capture groups, and the global flag replaces every occurrence.
Why do matches stop at 500?
The list is capped to keep the page responsive on very large inputs.
Related tools
JSON Formatter
Format, validate and minify JSON in one place.
XML Formatter
Pretty-print and indent XML documents.
YAML Formatter
Format YAML and convert between YAML and JSON in both directions.
CSV to JSON
Convert CSV tables into JSON data.
JWT Decoder
Decode JWT header, payload and expiration.
Hash Generator
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes.