Skip to content
clkr

Loading tools…

    Regex Tester

    Test regular expressions online free with live match highlighting, capture groups, flags and replace preview. Free online JavaScript regex tester and debugger.

    Loading…
    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.

    Part of the toolkit

    How to use Regex Tester

    1. 1Type a regular expression (without slashes) and toggle flags like g, i, m, s and u
    2. 2Paste your test text — matches are highlighted live and listed with their index and capture groups
    3. 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.