Skip to content
ZeroServer.tools

Regex Escape Tool

Escape special regex characters so a string can be used as a literal pattern.

Hello \(World\) \+ \$5\.00

✓ Pattern matches the original string

Characters that are escaped
.*+?^${}|[]()\\

Why escape regex characters?

Regex metacharacters like . * + ? ^ $ { } | [ ] ( ) \ have special meaning in a regular expression. If you want to match them literally — for example, matching the price string $5.00 — they must be escaped with a backslash. This tool applies the standard escaping pattern used in JavaScript, Python, Java, and most regex engines. Use the escaped pattern with new RegExp(escaped) or in string replace operations. See the regex tester to test patterns live.

Private & free — this tool runs entirely in your browser.

Recommended: IndieKit Ship your Next.js startup in days.affiliate

Related Developer Utilities tools