Validate Regex
Validate up to 2,048 UTF-16 units of pattern text using this browser’s RegExp constructor, then copy its normalized expression.
A QUICK WALKTHROUGH
How to use this tool
- Enter the pattern body without slash delimiters.
- Enter optional flags and select Validate syntax.
- Review the syntax result and copy the normalized expression.
Syntax and flags
Checks syntax supported by the current JavaScript browser engine. Allowed flags are d, g, i, m, s, u, v and y, each once. u and v are mutually exclusive; newer features may be unsupported in older browsers. Empty patterns are valid.
Explicit safety scope
Only compilation is performed. There is no text input, match preview, structural analysis or ReDoS audit. A syntactically valid pattern can still be unsafe to match. Patterns are limited to 2,048 UTF-16 units and remain in your browser.
GOOD TO KNOW
Common questions
Does valid syntax mean the regex is safe?
No. Syntax validity says nothing about catastrophic backtracking, matching performance or correctness for your data.
Does this validate PCRE or Python syntax?
No. It uses the current browser’s JavaScript RegExp syntax. Check the target runtime separately.
Are expressions uploaded?
No. Syntax validation and copying happen locally.