Regex Escape Tool

Use the Regex Escape Tool to escape literal text for safe use inside regular expressions, protecting special characters from becoming pattern syntax, locally.

Escapes regex metacharacters so the text can be safely used inside a regular expression pattern as a literal string.

Other Tools

About

The Regex Escape Tool converts literal text into a form that is safe to paste into a regular expression. It automatically escapes regex metacharacters so that they are treated as normal characters rather than pattern syntax. This is ideal when building search patterns from user input or arbitrary strings.