Regex Tester
Test JavaScript regular expressions against sample text instantly in your browser with match highlighting.
Ada wrote the first algorithm. Grace built the first compiler. Linus built a kernel and Ada wrote notes.
| # | Match | Index | Groups |
|---|---|---|---|
| 1 | Ada wrote | 0 | name: Adarole: wrote |
| 2 | Grace built | 31 | name: Gracerole: built |
| 3 | Linus built | 63 | name: Linusrole: built |
| 4 | Ada wrote | 88 | name: Adarole: wrote |
Type a replacement to preview the result.
How it works
Regular expressions are patterns compiled by the JavaScript RegExp engine. This tester constructs a RegExp from your pattern and flags, then runs it against the sample text to list matches, capture groups, and indices. Highlighting overlays help you see what the engine consumed without leaving the page. Because evaluation uses the same engine as most front-end apps and Node.js, results mirror production behavior for ECMAScript regex features, including lookarounds where supported. Invalid patterns surface as local errors instead of opaque server responses. No text is transmitted, so logs, customer messages, and secrets in fixtures stay private while you iterate. Prefer explicit flags (g, i, m, s, u) and small representative samples to keep feedback fast. Remember that catastrophic backtracking can freeze the tab on adversarial patterns—keep patterns purposeful and test incrementally.
Frequently asked questions
Which regex flavor is this?
JavaScript/ECMAScript via the browser RegExp engine—the same flavor used in most web apps.
Can I use multiline or dotAll flags?
Yes. Toggle standard flags such as g, i, m, s, and u from the interface.
Does my test string get uploaded?
No. Matching runs entirely client-side for privacy-sensitive samples.
Why did the page freeze?
Some pathological patterns cause excessive backtracking. Simplify the expression and retry.
More private tools
- JSON to TypeScriptGenerate interfaces or types from any JSON sample.
- Cron Expression BuilderBuild, explain and preview cron schedules.
- JWT DecoderInspect token headers, claims and expiry.
- SQL FormatterPretty-print queries for 7 SQL dialects.
- Format ConverterJSON, YAML, CSV, XML and TOML in any direction.