\\t \\n \\\\ \\xFF — C/Java/Python escapes
Escapes text using backslash sequences familiar from C, Java, Python, and most other languages: \\n, \\t, \\r, \\\\, \\\", \\', \\xNN, \\uNNNN.
Text → C-escaped box — the escaped string appears instantly in C-escaped.Encode non-ASCII as \xNN hex bytes to turn characters above U+007F into byte-level \xNN sequences.Escape single quotes too if your string needs \', for example in single-quoted source or shell strings.Copy result to grab the escaped string to your clipboard.C-escaped → Text box and the original text appears in Unescaped text.Clear any time to reset a box and start over.C, C++, Java, Python, Go, and JavaScript all share the same backslash escapes, so one escaped string drops cleanly into most source files.
Newlines, tabs, nulls, and backspaces become visible \n, \t, \0, and \b, so you can tell exactly what a string really contains.
Escape \" and \' so a string can hold quotes without terminating the literal, useful when building JSON or shell commands.
With the hex-bytes option, Unicode text becomes explicit \xNN byte sequences — handy for wire protocols and binary-safe formats.
Escape a payload for storage or a log line, then unescape it later to recover the original text exactly.
Everything runs in your browser. Nothing is uploaded, logged, or sent to a server — safe for sensitive strings and keys.
It's a backslash followed by one or more characters that stands for a single special character — \n is a newline, \t is a tab, and \\ is a literal backslash.
Escaping produces \n, \t, \r, \\, \", \0, \b, \f, \v, and \xNN for control characters. Unescaping also reads \uNNNN, \UNNNNNNNN, and octal \NNN.
By default, characters above U+007F pass through unchanged. Tick Encode non-ASCII as \xNN hex bytes to expand them into their UTF-8 bytes as \xNN sequences instead.
Single quotes are only escaped when Escape single quotes too is ticked, since most C-like languages only require escaping double quotes and backslashes.
\xNN encodes a single byte as two hex digits, while \uNNNN is a four-digit Unicode code unit and \UNNNNNNNN is an eight-digit code point.
No. Escaping is fully reversible and offers no security — it only makes characters safe to embed in a string literal. Anyone can unescape it back.
Never. All escaping and unescaping happens locally in JavaScript. Your input is not sent to, stored on, or logged by any server.