String Escape & Unescape

Quickly escape special characters for JSON or JavaScript. Convert newlines, tabs and quotes into safe sequences and back again.

Common Escape Sequences

Character Escape Sequence Description
\ \\ Backslash
" \" Double Quote
' \' Single Quote
(Newline) \n Line Feed
(Carriage Return) \r Carriage Return
(Tab) \t Horizontal Tab
(Backspace) \b Backspace
(Form Feed) \f Form Feed

Frequently asked questions

What is string escaping?

Escaping is the process of replacing certain characters that have special meanings (like newlines, tabs or quotes) with backslash sequences (like \n, \t or \"). This allows you to include these characters within a string literal in code.

When should I use this tool?

Use it when you need to paste a multi-line string into a JSON file or a JavaScript variable, or when you have an escaped string from a log file that you want to read in plain text.

Does it support Unicode?

Yes. Characters outside the standard ASCII range will be escaped using Unicode sequences (like \u00A9) to ensure compatibility across different environments.

Is my data private?

Absolutely. Like all ToolNest utilities, this tool runs entirely in your browser. No data is ever uploaded to our servers.