String Escape / Unescape Online

Escape or unescape string special characters instantly in your browser.

\nnewline\ttab\rcarriage return\\backslash\"double quote\'single quote\0null\uXXXXunicode
INPUT0 chars
OUTPUT

What Is String Escape / Unescape?

String Escape / Unescape is a free online tool for converting between raw text and escaped string representations. In Escape mode it converts special characters — newlines, tabs, backslashes, quotes — into their escape sequence equivalents (\n, \t, \\, \") so the text can be safely embedded in source code or JSON. In Unescape mode it does the reverse, turning escape sequences back into the actual characters they represent. Supports all standard C/JavaScript escape sequences including \uXXXX Unicode and \xXX hex.

How to Use String Escape / Unescape

  1. Choose Escape to convert raw text to escape sequences, or Unescape to decode them.
  2. Paste your text into the input panel, or click Load Sample to try an example.
  3. The result appears instantly in the output panel.
  4. Click Copy to copy the result to clipboard.

Features

  • Escape mode: converts special characters to \n, \t, \\, \", etc.
  • Unescape mode: decodes escape sequences back to raw characters
  • Supports \uXXXX Unicode and \xXX hex sequences
  • Quick reference panel showing all supported escape sequences
  • Copy result to clipboard in one click
  • Runs entirely in your browser — zero data uploaded

FAQ

What is string escaping?

String escaping converts special characters (like newlines, tabs, and backslashes) into escape sequences (like \n, \t, \\) so they can be safely embedded in source code strings or transmitted as plain text.

What escape sequences does this tool support?

The tool supports \n (newline), \t (tab), \r (carriage return), \\ (backslash), \" (double quote), \' (single quote), \0 (null), \b (backspace), \f (form feed), \v (vertical tab), \uXXXX (unicode), and \xXX (hex).

Is my text sent to a server?

No. All processing happens entirely in your browser. Your text never leaves your device.

What is the difference between escape and unescape?

Escape converts raw characters to escape sequences (e.g., a real newline becomes \n). Unescape does the reverse — it converts escape sequences back to the actual characters they represent.