JavaScript Escape Unescape

Escape raw text into JavaScript-safe string literal content or decode JavaScript escape sequences back into readable text without using eval.

Last updated: August 2026 | By Workshelve Team

Rule
escape \, quotes, control chars, and optionally non-ASCII with unicode escapes
Output
Output will appear here...

Escape sequences

0

Control chars

0

Output chars

0

Strict JavaScript parsing

The parser decodes only supported string escapes and throws readable errors for malformed or unsupported sequences.

No eval shortcuts

Everything is transformed with explicit logic, which keeps behavior deterministic and avoids code execution risks.

Unicode-aware output

Escape mode can emit compact code point escapes or classic surrogate pair unicode escapes for higher code points.

JavaScript Escape Reference

Sequence
Meaning
\\
Backslash
\"
Double quote
\'
Single quote
\n
Newline
\t
Tab
\x41
Hex A
\u0041
Unicode A
\u{1F600}
Unicode grinning face

Related Tools