String Escape / Unescape

Escape text for source code (newlines, tabs, quotes, backslashes, \uXXXX) and unescape it back — instantly, in your browser.

Escaped

🔒 Escaped in your browser — nothing is uploaded. Handles newlines, tabs, quotes, backslashes and \uXXXX.

Escape text for code, and back

Paste text to see it escaped for embedding in a string literal — newlines become \n, tabs \t, quotes \" and backslashes \\. Paste escaped text in the second box to turn it back into plain text. It also decodes \uXXXX unicode escapes. Everything runs in your browser.

When you need it

Handy when you have to drop a multi-line snippet, a path, or text with quotes into a JSON value, a JavaScript string, or a config file without breaking the syntax.

Frequently asked questions

Which escapes are supported?

Escaping handles newlines, carriage returns, tabs, double quotes and backslashes. Unescaping also understands \b, \f, \/ and \uXXXX.

Is this the same as JSON.stringify?

It covers the same common escapes for embedding text in a string, without adding the surrounding quotes, so you can paste the result straight into an existing string.

Is my text uploaded?

No. Escaping and unescaping run entirely in your browser.