Decode JavaScript escape sequences

Decode JavaScript escape sequences back into their represented text.

freeworks offlinenothing uploaded
ToolJavaScript Unescape
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

JavaScript escape sequences are parsed into their represented code units or code points, including hexadecimal, Unicode, and control escapes. The parser treats escape syntax as source notation and does not execute the resulting text.

  • ECMAScript supports legacy and modern escape forms for source compatibility.

Worked example

Unescape String
Convert JavaScript escape sequences back to readable text
Input
											Hello\nWorld\t!
										
Output
												Hello
World	!
											

When to use this

Source fixtures, serializers, and debugging tools decode JavaScript literals.

Edge cases

  • A malformed hexadecimal escape cannot consume arbitrary digits.
  • Surrogate pairs can represent one astral character.
  • Unescaping source text does not make it safe for HTML or SQL.

References