How it works
How to use the Regex Tester
Write a pattern
Type it between the slashes and toggle flags like g, i, m and s. Or start from a common pattern.
Paste test text
Matches are highlighted as you type; capture groups get their own colors.
Try replacements
Open the Replace tab and use $1, $<name> or $& in the replacement.
Regex quick reference
| Token | Meaning |
|---|---|
. \d \w \s | Any character, digit, word character, whitespace |
[abc] [^abc] [a-z] | Character sets and ranges |
* + ? {2,5} | Quantifiers (add ? to make them lazy) |
^ $ \b | Start, end, word boundary |
(…) (?<name>…) (?:…) | Capture group, named group, non-capturing group |
(?=…) (?!…) (?<=…) | Lookahead, negative lookahead, lookbehind |
Patterns run in a background worker with a 2-second limit, so a runaway pattern such as (a+)+$ can’t freeze the page.
Built for developers
Why developers use it
Private by design
Runs 100% in your browser. Nothing you paste is uploaded, logged or stored on a server.
Instant results
Output updates as you type, with precise error locations when something is wrong.
Works offline
Once loaded, the tool keeps working without a connection. Install it as an app if you like.
Free, no sign-up
No accounts, no limits, no watermarks.
FAQ
Frequently asked questions
Which regex flavor is this?
JavaScript (ECMAScript) regular expressions as implemented by your browser — the same engine used in Node.js, Deno and browsers.
Why does my pattern time out?
Nested quantifiers like (a+)+ can take exponential time on some inputs (catastrophic backtracking). Make quantifiers more specific or use atomic alternatives.
Is my data uploaded anywhere?
No. This tool runs entirely in your browser. Your input never leaves your device, is not logged, and works offline once the page has loaded.
Keep going
Related tools
- JWT DecoderDecode JWTs, inspect claims and verify signatures
- UUID GeneratorGenerate UUID v4 / v7 in bulk and inspect UUIDs
- Timestamp ConverterConvert Unix timestamps to dates and back, in any time zone
- Cron Expression ExplainerExplain crontab schedules and show next run times
- Text & File DiffCompare two texts or files line by line
- Credit Card ValidatorCheck card numbers with the Luhn algorithm
- JSONPath TesterEvaluate JSONPath expressions against your JSON
- Random Data from RegexGenerate strings that match a regular expression