Advertisement

Backslash Escape / Unescape

Escape and unescape backslash sequences in strings. Convert newlines, tabs, quotes, and special characters to their escaped representations (\n, \t, \", etc.) or reverse the process. Supports Unicode \uXXXX sequences. Essential for preparing strings for JSON, code, or config files.

Escape Sequences Reference

\\

Backslash

\"

Double quote

\'

Single quote

\n

Newline

\r

Carriage return

\t

Tab

\0

Null

\uXXXX

Unicode

How to Use

Choose Escape or Unescape mode, then paste your text. In Escape mode, special characters like newlines and tabs are converted to their backslash representations. In Unescape mode, escape sequences are converted back to actual characters. Use Swap to quickly reverse the operation.

Common Use Cases

Prepare strings for embedding in JSON or code. Debug escaped strings from API responses. Convert multi-line text into a single-line string literal. Handle Unicode escape sequences.

Advertisement

Frequently Asked Questions

Related Tools