Skip to content
Toolbento

Regex escape

Escape special characters so a piece of text matches literally inside a regular expression.

Everything stays on this device

Regex escape runs in your browser. The text and files you add are worked on by this device and are never uploaded, to us or to anyone else.

  • No uploads. The page is blocked from sending data to any other server.
  • No account, cookies, ads or tracking.
  • Fonts and scripts come from toolbento.app itself, so the page makes no requests to other companies.
  • Closing the tab clears your text and files from memory.

Read the full details on the privacy page.

Missing a feature or found a bug in Regex escape? Tell me on X (@_andrewtran) or by email.

How to use Regex escape

  1. Paste the text you want to match exactly.
  2. Tick the slash option if the pattern goes between two slashes.
  3. Copy the escaped pattern from the output pane.

Questions and answers

Is my data sent anywhere?

No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.

Which characters are escaped?

The ones with a meaning in a pattern: the dot, star, plus, question mark, caret, dollar sign, pipe, backslash and all three kinds of bracket.

Does it work outside JavaScript?

Yes. The same characters are special in most regex engines, including those in Python, Java, Go and PCRE.

Esc

Loading tools