Tool workspace
Regex tester, regular expression checker and replacer
Test expressions, flags, matches and replacement output live.
Regex tester and replacer
Regex tester and replacer
bytes →
Regex tester and replacer
Query parameters
IDN / Punycode
Regex tester and replacer
..
Header
Payload
Metadata
· Expires:
Verify signature
Sign (HS)
Regex tester and replacer
Pattern library
Highlighted matches
Matches ()
Replacement result
Regex tester and replacer
Relative:
Timezone
Build from parts
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
How Regular Expressions Read Text
Regular expressions describe text patterns through literals, classes, repetition, boundaries, and groups. Learning how those parts cooperate makes regex far less mysterious.
Read articleWriting Regular Expressions Other Developers Can Maintain
Readable regex depends on narrow responsibility, explicit boundaries, named groups, examples, and tests that explain why the pattern exists.
Read articleAvoiding Catastrophic Regex Backtracking
Some regex patterns explore an enormous number of matching paths on hostile input. Understanding ambiguity prevents performance bugs and denial-of-service risks.
Read articleRegex 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 Type your pattern in the pattern field.
- 2 Toggle flags such as g (global), i (ignore case) and m (multiline).
- 3 Enter sample text; matches are highlighted and listed with their groups.
- 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.