{ }Free
Escape a literal for regex
Escape text for literal matching inside a regular expression.
Escape text for literal matching inside a regular expression. Add backslashes to regex metacharacters so a string can be matched as literal text. Characters such as dots, plus signs, brackets and parentheses lose their regex operator meaning.
How to use
- Enter your text, values, or image.
- Adjust the options and run the tool.
- Copy or download your result.
Worked example
Example input
Input: a+b(c)
Example result
a\+b\(c\)
Limitations and details
This escapes a regex pattern fragment, not every embedding context; JavaScript string literals and regex delimiters may need separate escaping.
Inputs and options
- Input
- Text
Frequently asked questions
Is this tool free and private?
Yes. All 300 tools are free in this phase. Processing happens in your browser; your input and files are not sent to our servers.