AbraCalc

Regex Special Character Escaper

Escape special regex characters in a string so it can be used as a literal pattern. Free, instant.

Embed this tool on your site

How to use this tool

  1. Enter text to escape in the fields above.
  2. Results update instantly as you type — or click Calculate.
  3. Read your escaped regex and the full breakdown beneath it.

Escape a plain text string so all special regex metacharacters are treated as literals when passed to RegExp().

Frequently asked questions

Which characters need escaping in regex?
The characters . * + ? ^ $ { } ( ) | [ ] and \ have special meaning in regex and must be escaped with a backslash to match literally.

References & sources