Tool workspace

Regex tester, regular expression checker and replacer

Test expressions, flags, matches and replacement output live.

Regex tester and replacer

Size: bytes Keys: Depth:

        

Regex tester and replacer

bytes →


        
    

Regex tester and replacer

Query parameters

IDN / Punycode


    

Regex tester and replacer

..

Header


    

Payload


    

Metadata


        
    

Verify signature

Sign (HS)


            

Regex tester and replacer

Pattern library

Highlighted matches

Matches ()

Replacement result


    

Regex tester and replacer

Relative:

Timezone

Build from parts


        
Day of year: Week: Weekday:

Difference


        

Regex tester and replacer


    

Regex tester and replacer

Regex tester and replacer


        
    

Examples

Pattern

\d{4}-\d{2}-\d{2}

Matches in 2026-06-03

2026-06-03

Regex Guides & articles

Regex tester and replacer

Test expressions, flags, matches and replacement output live. DevToolGrid Online offers a free Regex tester, regular expression checker and replacer.

What is a regular expression?

A regular expression (regex) is a pattern that describes a set of strings. Developers use regex to search text, validate input such as emails or dates, extract parts of a string, and find-and-replace with precision. A pattern is built from literal characters plus metacharacters like ., *, +, ? and character classes.

How to test a regular expression

  1. 1 Type your pattern in the pattern field.
  2. 2 Toggle flags such as g (global), i (ignore case) and m (multiline).
  3. 3 Enter sample text; matches are highlighted and listed with their groups.
  4. 4 Add a replacement using $1, $2 or named groups to rewrite the text.

Common regex pitfalls

  • Unescaped special charactersCharacters like . * + ? ( ) [ ] have special meaning. To match them literally, escape them with a backslash.
  • Greedy vs lazy quantifiers* and + are greedy and match as much as possible. Add ? (for example .*?) to match as little as possible.
  • Forgetting the global flagWithout the g flag only the first match is replaced or returned.

Regex tester vs replacer

A regex tester checks whether a pattern matches and shows every match and capture group — ideal for validation and debugging. A regex replacer rewrites text by substituting matches with a replacement string that can reference captured groups via $1 or $<name>. This tool combines both, plus a split mode and a library of ready-made patterns.

FAQ

Is this tool free?

Yes. The regex tester and replacer are completely free with no limits.

Is my text sent to a server?

No. Patterns and test text are evaluated locally in your browser; nothing is uploaded.

Which regex flavor does it use?

It uses the JavaScript (ECMAScript) regex engine, including named groups and the s and u flags.

Does it support capture groups?

Yes. Numbered and named groups are shown for every match and can be used in replacements.