Developer

Regex escape

Escape special characters so text can be used safely inside a regular expression.

Enter Text and Wrap as /.../ to calculate Escaped. Results update instantly as you type. Try an example preset to sanity-check the tool.

Inputs

Paste raw text and this tool will escape regex metacharacters like . * + ? ( ) [ ] { } and \.
If enabled, wraps the escaped output as a JavaScript regex literal.
Examples
About this tool
  • Inputs: Text, Wrap as /.../
  • Outputs: Escaped
References
  • JavaScript regular expressions
Share & embed
Share link
Embed
Need help or found an issue?
Report an issue Suggest a tool