Backslash Escape / Unescape Online
Escape or unescape special characters in strings. Handles newlines, tabs, quotes, and backslashes.
Escape Sequences
\\n — newline\\t — tab\\r — carriage return\\\\ — backslash\" — double quote\\' — single quote
What is Backslash Escaping?
Backslash escaping is a way to represent special characters in strings. In most programming languages, characters like newlines, tabs, and quotes must be "escaped" with a backslash (\\) when used inside strings.
When Do You Need to Escape?
You need escaping when embedding strings in code, JSON, CSV, or configuration files. Unescaped special characters can break parsing or introduce security vulnerabilities.