Escape special regex characters for literal matching
Escaped characters: . * + ? ^ $ { } ( ) | [ ] \
Paste your pattern
Enter a string containing regex special characters to escape.
View escaped pattern
See your text with regex metacharacters properly escaped.
Copy the result
Click the Copy button to copy the escaped pattern to your clipboard.
Yes, the Regex Escape tool is completely free with no limitations. Escape as much text as you need for use in regular expressions without any registration or restrictions.
Yes, all regex escaping happens locally in your browser. Your patterns and text are never sent to any server, making it safe to work with sensitive search patterns.
Regex escaping adds backslashes before special regex characters like . * + ? ^ $ { } [ ] \ | ( ). This converts literal text into a pattern that matches that exact text, rather than being interpreted as regex operators.
Escape text when you want to match special characters literally, building regex patterns from user input, searching for text that contains regex metacharacters, or creating patterns that include punctuation like periods or brackets.
The tool escapes characters for JavaScript/ECMAScript regular expressions, which is compatible with most modern regex implementations. The escaped output works safely in JavaScript, Python, Java, and most other regex engines.