Skip to content
LovTools
EN

Regex Escape

Escape special characters so text matches literally in a regular expression.

Processed locally on your device — nothing is uploaded.

About the Regex Escape

Searching for a URL, a price like $9.99 or a file path with a regular expression goes wrong because characters such as . ? $ and ( have special meanings. Paste the text and every special character is escaped with a backslash so the pattern matches it exactly.

The forward slash is escaped too, so the result also works inside /…/ literals.

How to use the Regex Escape

  1. Paste the literal text.
  2. Copy the escaped pattern.
  3. Use it in your regex or the Regex Tester.

Features

  • Batch files: run the tool on up to 200 files with the same settings and download every result as one ZIP
  • Escapes all regex metacharacters
  • Safe inside /…/ literals
  • Works for JS, Python, PHP, Java
  • Live output

Supported formats

  • Plain text

Frequently asked questions

Why not just use a plain string search?

If you only need a literal match, that is simpler. Escaping is for combining literal text with other regex parts.

Is my text sent anywhere?

No. Everything runs in your browser, so nothing you paste is uploaded or stored.

Added · Last reviewed · Maintained by Sohail Khax · How we test tools