Illustration of literal text being escaped with backslashes so it's safe inside a regular expression

Regex Escape Tool

Paste a literal string and get back a version safe to embed inside a regular expression — every character with special regex meaning gets a backslash in front of it, so the result matches only the exact literal text. Runs entirely in your browser.


Test it

Check that the escaped pattern matches the literal text exactly, and nothing else.


💻 Show API usage examples (cURL)
curl -sS -X POST https://devops.majbase.com/regex-escape/api -H "Content-Type: application/json" -d '{"text":"price: $5.00 (10% off)"}'

Returns {"result": "..."}, or {"error": "..."}.