Escape text for regex

Escape regex special characters so you can use text as a literal. In your browser.

Escape text for regex

To search for a string as a literal in a regular expression, you need to escape special characters (. * + ? ^ $ {} [] () | \). This tool escapes them automatically so you can safely use any string in your regex. Everything runs locally in your browser.