JavaScript Escape Unescape

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

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.

Hex and code point escapes

Hex escapes use two digits, while Unicode escapes use four digits or a code point inside braces. The brace form can represent emoji in a single escape.

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