Skip to content
Takikit

Regex Escape

Add a backslash before . * + ? ( ) [ ] so you can match a string literally in a regex.

Loading tool...

Runs in your browser. Nothing is sent anywhere.

When to use it

Use this when you need to match a literal string full of dots, parentheses and plus signs, like a price with a discount note, in a code editor or source code where regex keeps treating them as special characters.

The tool also escapes /, which suits pasting into a JavaScript /.../ literal. Hyphens are left alone because they have no special meaning outside brackets, so the result also works with the u flag on.

How to use

  1. Paste the string you want to find.
  2. The escaped expression appears right away.
  3. Click Copy or Download file.

Frequently asked questions

Is the data I paste sent to a server?

No. The tool runs in JavaScript right in your browser, and Takikit has no server that receives data. You can turn off your internet after opening the page and the tool will still work.

Related tools

More Developer tools

See all developer tools