Regex Escape Tool

Escape special regex characters in a string so it can be used as a literal match in regular expressions.

How to Use Regex Escape Tool

The Regex Escape Tool is a free online utility that automatically escapes all special regular expression characters in your text so it can be used as a literal match pattern. Characters like . * + ? ^ $ { } ( ) | [ ] and backslash are prefixed with a backslash to prevent them from being interpreted as regex metacharacters. This is essential when building regex patterns from user input, searching for file paths or URLs that contain dots and slashes, matching dollar amounts or mathematical expressions, or any time you need to match text literally that contains regex-special characters. Results update in real-time as you type.

Step-by-Step Instructions

  1. Paste or type text containing special characters
  2. View the escaped result updating in real-time
  3. See which characters were escaped
  4. Copy the escaped string for use in your regex

Related Tools

More Free Tools