Regex Tester
Test regular expressions online free with live match highlighting, capture groups, flags and replace preview. Free online JavaScript regex tester and debugger.
Processed locally in your browserHow?
This tool runs in this browser tab. The files, text and values you enter are not uploaded to clkr.work servers — closing the tab clears them. Anonymous usage events (such as which button was pressed) are counted, never your content. Privacy policy
What next?
Found it useful? Share Regex Tester
Free, no sign-up, works in the browser — send it to a friend or add it to your site.
Related tools
- Cron Expression GeneratorExplain any cron expression in plain English and see the next run times. Free online cron expression generator and crontab guru alternative with presets.
- JSON FormatterFormat and validate JSON instantly. Free online JSON formatter — paste messy JSON, beautify or minify, catch errors in your browser.
- Binary TranslatorTranslate text to binary and binary to text with this free online binary translator, and convert numbers between binary, decimal, hex and octal.
- CSS MinifierMinify CSS with this free online CSS minifier: strip comments and whitespace safely, see bytes saved, or beautify minified CSS back into readable code.
- HTML Entity Encoder / DecoderEncode text to HTML entities or decode entities like & and © back to characters with this free online HTML entity encoder and decoder.
- JSON to CSV ConverterConvert JSON to CSV and CSV to JSON online free. Flattens nested objects, handles quotes and commas, opens in Excel. Free online JSON to CSV converter.
Part of the toolkit
How to use Regex Tester
- 1Type a regular expression (without slashes) and toggle flags like g, i, m, s and u
- 2Paste your test text — matches are highlighted live and listed with their index and capture groups
- 3Tick Replace to preview a replacement using $1, $<name> or $&, and copy the regex, matches or result
Frequently asked questions
Which regex flavor is used?▾
JavaScript (ECMAScript) regular expressions, exactly as they run in browsers and Node.js — including named groups (?<name>…), lookbehind (?<=…) and the s (dotAll) and u (unicode) flags.
What do the g, i, m, s and u flags do?▾
g finds all matches instead of the first, i ignores case, m makes ^ and $ match at line breaks, s lets . match newlines, and u enables full Unicode matching.
Why does my pattern say it took too long?▾
Nested quantifiers such as (a+)+ can cause catastrophic backtracking, where the engine tries exponentially many paths. The tester runs your regex in a background worker and stops it after 1.5 s instead of freezing the page.
How do I use capture groups in a replacement?▾
Use $1, $2… for numbered groups, $<name> for named groups and $& for the whole match. For example, pattern (\w+)@(\w+) with replacement $2 at $1.
Embed Regex Tester on your website▾
Paste this snippet into your page. The embedded tool runs in your visitor's browser and shows a small “Powered by clkr.work” link.