Skip to content
Work data is processed in your browser, not stored on our servers.
tools
String Escape and Unescape Converter

String Escape and Unescape Converter

Escape newlines, tabs, and quotes, or restore Unicode and hexadecimal escape sequences to literal characters.

Escape / unescape
Process backslash sequences (\n, \t, \r, ", \\, and others) and Unicode \uXXXX escapes. All conversions happen in your browser.

Key features

  • Escapes newlines, tabs, carriage returns, quotes, and backslashes.
  • Processes control characters and characters outside printable ASCII with JSON string rules.
  • Restores common sequences including \uXXXX, \xXX, \n, and \t.
  • Can wrap the result as a complete quoted JSON string literal.

How to use

  1. Choose Escape or Unescape mode.
  2. Enter the string and inspect the result.
  3. Optionally enable quoted output, then copy it.

Examples

  • Prepare a code string

    Escape text containing line breaks and quotes for a JavaScript or JSON string.

  • Restore escaped log text

    Turn values containing \n, \t, or Unicode codes back into readable text.

Privacy

String escaping and restoration run in your browser.

Common questions

Which escape formats are supported?
You can transform JavaScript strings, JSON strings, regular-expression literals, and Unicode code escapes separately.
Does unescaping remove surrounding quotes?
JSON mode restores a valid JSON string literal. Other modes translate backslash sequences for the selected format back into characters.