Skip to content
Developer & CodeLocal · Stays on device

Regex Explainer

Paste a regular expression and see every token, group, quantifier and flag explained in plain English, with syntax from other engines flagged.

  • JavaScript regex, /pattern/flags literals
  • Free to use
  • No sign-up or watermark
regex-explainerOn this device
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
JavaScript regex/pattern/flags literals
Open Regex Explainer

About this tool

Breaks a regular expression into a tree you can read: each piece of the pattern next to a sentence saying what it matches — “a digit (0–9), exactly 4 times”, “capture group 1, named year”, “not followed by…”. Character classes list their ranges, quantifiers say whether they are greedy or lazy, alternatives are numbered, and every flag is explained. Paste either a bare pattern or a JavaScript literal like /abc/gi.

The explanation follows JavaScript’s regex rules. Syntax from other engines that JavaScript doesn’t support — Python’s (?P<name>…), atomic groups, possessive quantifiers, \A and \Z, inline modifiers — is flagged with the JavaScript alternative. Common mistakes such as unbalanced parentheses, a quantifier with nothing to repeat or a backwards range are pointed out, and the browser’s own RegExp engine confirms whether the pattern is valid. The pattern is never run against any text. Everything runs in your browser. Your data is never uploaded, logged or stored.

  1. Input

    Your code or text

    JavaScript regex, /pattern/flags literals

  2. Processing

    Processed in this browser

    Instant, in-browser. Nothing is uploaded.

  3. Output

    Your result

    Ready to download or copy

Local processing pipelineInstant, in-browser

How to use it

  1. 1

    Paste a pattern or a /pattern/flags literal (or try an example).

  2. 2

    Read the piece-by-piece explanation and any issues.

  3. 3

    Copy the explanation for a code review or documentation.

Zero-upload architecture

How to use Regex Explainer for free, with no upload

Free, with no sign-up or watermark · Your files stay on your device

  1. 1

    Open Regex Explainer

    Launch the app and add your file. There is nothing to install and no account to create.

  2. 2

    Work through it

    Read the piece-by-piece explanation and any issues.

  3. 3

    Get your result

    Copy the explanation for a code review or documentation.

  • Local

    Regex Builder

    Build a regular expression step by step from text, character types, common patterns and groups, test it live and export it for JavaScript, Python or PHP.

    Open tool
  • Local

    Regex Tester

    Test JavaScript regular expressions with live match highlighting, capture groups and replace preview.

    Open tool
  • Local

    Unicode Script Inspector

    See every character’s code point, script, category and UTF-8 bytes, and spot invisible, bidi and mixed-script look-alike characters.

    Open tool
  • Local

    Regular Expression Escape Tool

    Escape text so it matches literally in a regex pattern, a character class or a replacement string, for JavaScript, PCRE, Python, Java, .NET or POSIX.

    Open tool