String Escape / Unescape Online
Escape or unescape string special characters instantly in your browser.
\nnewline\ttab\rcarriage return\\backslash\"double quote\'single quote\0null\uXXXXunicodeWhen to use String Escape / Unescape
Convert selected control characters and quotes to visible escape sequences, or decode those sequences for inspection. This is a generic string helper, not a complete parser for any programming language.
How to use String Escape / Unescape
- Choose Escape or Unescape and paste the string, or load the selected mode’s sample.
- Inspect the output and the reference chips. Whitespace is retained rather than trimmed.
- Copy the result. Add surrounding quotes or language-specific handling only after checking the destination syntax.
Worked example
Unescape input: caf\u00e9
Output: café
Unescape input: \x41
Output: A
Unescape input: \u{1F600}
Output: \u{1F600} (unchanged)How the tool handles input
Escape uses a fixed character map for backslash, newline, carriage return, tab, NUL, both quote types, backspace, form feed, and vertical tab. Other characters, including ordinary Unicode text, remain unchanged. Unescape uses a single replacement pass for the corresponding short sequences, four-hex-digit Unicode code units, and two-hex-digit escapes. It does not remove surrounding quotes.
Limitations
Unknown or malformed escapes are preserved without a syntax error. Braced Unicode code points, octal escapes, and full language-literal syntax are not supported. Four-digit Unicode escapes are UTF-16 code units; a valid pair can form an emoji, but lone surrogates are not rejected. Escape does not convert every control character or every non-ASCII character to ASCII escapes. Its NUL, single-quote, and vertical-tab escapes are not JSON string syntax, so do not treat this output as JSON serialization. There is no language selector or byte-encoding conversion.
Frequently asked questions
Does Unescape recursively decode the result?
No. It makes one replacement pass. Newly produced backslash sequences are not processed again during that pass.
Are outer quotes removed?
No. Quotes are part of the text. This page does not parse a complete quoted literal.
Does Escape turn café into ASCII-only text?
No. Ordinary Unicode characters are preserved. Only characters in the fixed escape map are replaced.