Test JavaScript regular expressions with live highlighting and a plain-English explanation
Runs in your browser. Nothing you type is sent anywhere. Updated on 24 Oct 2026.Testing a regular expression shows what it matches as you type, with every capture group highlighted and a plain-English reading of the pattern. Far quicker than rerunning a script to find out why group 1 is empty. Works on JavaScript regex, and your text stays in the browser.
Type the pattern into Pattern, between the slashes, and set the g, i, m, s, u and y flag chips.
Paste the text to search into Test text; every match is highlighted as you type.
Read the Matches tab for each match, its index and its capture groups.
Open Replace, enter a replacement such as $1 or $<name>, and copy the result.
Open Explain to read each part of the pattern in plain English.
This regex tester runs your pattern against sample text as you type and highlights every match. A table lists each match with its position and the text captured by every numbered and named group, and a replace box shows the result of String.replace with your replacement, including $1 and $<name> references.
People reach for it when a validation rule rejects input it should accept, or when a log search returns too much. Two common cases: checking that a pattern for Indian PIN codes accepts 560001 but not 56001, and working out why .* swallowed half a line when you wanted only the first quoted value.
The tester uses the JavaScript engine in your browser, so the flags g, i, m, s, u and y behave exactly as they will in your Node.js or front-end code. Other flavours such as PCRE, Python and Java differ in places (possessive quantifiers, inline flags), so test those in their own language. Your pattern and text never leave your device.
The explain panel breaks the pattern into parts in plain English: character classes, quantifiers, anchors, groups, alternation, escapes and lookarounds. It also warns when a group repeats something that already repeats, such as (a+)+, which can freeze a page on text that almost matches. Matching runs in a background worker with a time limit, so a pattern like that is stopped and reported instead of locking your browser. Related tools: Diff Checker, URL Encoder.
Yes. There is no signup and no limit on how many patterns you test. The page is supported by a small number of ads shown outside the tool, never inside it.
JavaScript, through your browser's own RegExp engine. Results match what you get in Node.js, Deno and front-end code. PCRE, Python and Java regex differ in some features, such as possessive quantifiers and inline flags, so check those in their own language.
Wrap part of the pattern in brackets, for example (\d{4}), or name it with (?<year>\d{4}). The match table shows every numbered and named group for each match, and shows an empty cell when a group did not take part.
The pattern took longer than the time limit on your text, usually because of catastrophic backtracking: a repeated group that contains another repetition, such as (a+)+ or (\w+\s?)*. Make the inner part more specific or remove one of the repetitions.
Type the replacement in the Replace box. Use $1, $2 for numbered groups, $<name> for named groups and $& for the whole match. Turn on the g flag to replace every match instead of only the first.
No. The pattern runs in a background worker inside your browser. Nothing you type is sent to a server, so it is safe to test on logs or data that contain personal details.
Still stuck? Ask about Regex Tester and anybody who knows can answer. No account needed.
Also works as: Regex Checker · Regular Expression Tester.
Same job, other tools: Link Preview Checker – Find the missing tag behind a WhatsApp or Slack link with no picture · Readability Checker – Flesch reading ease and grade level, with what to change.
On the related tools: IBAN Check Digit Calculator – Build an IBAN from a country and account number: the two check digits are calculated.
In the collection Debug and Inspect.