🔍 Regex Tester & Debugger
Write a pattern, paste some text and see every match, capture group and replacement as you type.
| # | Match | Index | Groups |
|---|
How to use the Regex Tester
- Type a regular expression (without slashes) and its flags, for example g for all matches and i for case-insensitive.
- Paste the text to test. Matches are highlighted instantly and listed with their capture groups.
- Enter a replacement to preview the result of String.replace.
Frequently asked questions
Which regex flavor does this use?
Your browser's JavaScript (ECMAScript) engine, the same one used by Node.js and front-end code. Lookbehind, named groups (?<name>…) and Unicode property escapes \p{…} with the u flag are supported.
What do the flags mean?
g finds all matches, i ignores case, m makes ^ and $ match at line breaks, s lets . match newlines, u enables full Unicode, d adds match indices and y matches only at lastIndex (sticky).
Why does my pattern freeze the page?
Some patterns, like nested quantifiers such as (a+)+, can take exponential time on certain inputs (catastrophic backtracking). Simplify the pattern or make quantifiers possessive-like with more specific character classes.
Is my text sent anywhere?
No. Everything runs locally in your browser.
More free tools
JSON Formatter & Validator
Paste JSON to pretty-print it, minify it, or pinpoint the exact line and column of a syntax error.
Base64 Encoder & Decoder
Convert text and files to and from Base64, with proper Unicode handling and a URL-safe option.
CSV ↔ JSON Converter
Turn spreadsheets into JSON for your code, or JSON arrays back into CSV for Excel and Google Sheets.
UUID Generator
Create universally unique identifiers for databases, APIs and tests, with crypto-secure randomness.