Zero Signup ToolsFree browser tools

Developer Tools

Regex Explainer

Paste a regex literal or pattern. Get a token-by-token plain English breakdown, flag explanations, and compile errors in your browser. No signup.

29 chars
Or try a sample

Token breakdown

10 tokens
  1. Step 1index 0
    ^

    Start anchor

    Match the position at the start of the input. With the m flag this also matches the start of each line.

  2. Step 2index 1
    [\w.+-]

    Character class

    Match any single character that is A word character: a letter, digit, or underscore (ASCII), or ".", or "+", or "-".

  3. Step 3index 8
    +

    Quantifier

    Repeat the previous element one or more times.

  4. Step 4index 9
    @

    Literal

    Match the character "@" exactly.

  5. Step 5index 10
    [\w-]

    Character class

    Match any single character that is A word character: a letter, digit, or underscore (ASCII), or "-".

  6. Step 6index 15
    +

    Quantifier

    Repeat the previous element one or more times.

  7. Step 7index 16
    \.

    Escape

    A literal . (period), not the any-character metachar.

  8. Step 8index 18
    [\w.-]

    Character class

    Match any single character that is A word character: a letter, digit, or underscore (ASCII), or ".", or "-".

  9. Step 9index 24
    +

    Quantifier

    Repeat the previous element one or more times.

  10. Step 10index 25
    $

    End anchor

    Match the position at the end of the input. With the m flag this also matches the end of each line.

How to use

  1. Paste a regex literal in the form /pattern/flags, or just the pattern on its own.
  2. Read the token breakdown panel: each chip shows the source slice, a label, and a plain English explanation of what that piece of the pattern matches.
  3. Check the Flags panel for what each active flag (g, i, m, s, u, y, d, v) changes about matching behavior.
  4. Look at the Groups panel to see the total capture-group count and any named groups available for backreferences or replacements.
  5. Use Copy regex literal or Copy full explanation, or click a sample to load common patterns like email, URL, hex color, or strong password.

About this tool

Regex Explainer parses any JavaScript-style regular expression and produces a numbered, token-by-token plain English breakdown so you can understand exactly what a pattern does before you ship it. Paste a full literal like /pattern/flags or just a bare pattern: the tool splits the input, recognizes every common construct (literals, escapes, character classes, anchors, alternation, groups, quantifiers, lookaheads, lookbehinds, named captures, backreferences, Unicode escapes, and Unicode property escapes), and renders each as a labeled chip with a one-sentence explanation. The flags panel describes every active flag (g, i, m, s, u, y, d, v) and flags any unknown or duplicated flag characters. A capture-group summary shows the total number of groups and lists the named ones. The pattern is also handed to the native RegExp constructor so any compile error surfaces with the engine's own message. Quick samples cover real-world patterns developers reach for: email-like strings, ISO dates with named captures, URLs, hex colors, strong password rules with lookaheads, and IPv4 octets. Parsing runs entirely in the browser; the pattern you paste is never uploaded.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsDeveloper Tools