Report Tool or Give Us Suggestions

JavaScript Escape Unescape

Escape and unescape JavaScript strings instantly

L ading . . .

JavaScript Escape and Unescape Tool

Use this tool to quickly convert plain JavaScript text into escaped JavaScript strings and decode escaped sequences back to readable text. It is useful when embedding JavaScript snippets inside strings, JSON payloads, templates, and logs.

What it supports

The converter handles common escape sequences such as quotes, backslashes, tabs, and line breaks using JavaScript-compatible behavior. Paste your input, switch mode, and copy the output instantly.

Frequently Asked Questions

When should I use JavaScript escaping?

Use escaping when you need to place text safely inside JavaScript string literals or transport strings containing special characters.

Why does unescape show an error for some input?

Invalid or incomplete escape sequences can’t be parsed as valid JavaScript strings. Correct the malformed sequence and try again.