Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the
compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Warning: Although … All of the language features and behaviors specified in this annex have one or more undesirable characteristics and in the absence of legacy usage would be removed from this specification. … … Programmers should not use or assume the existence of these features and behaviors when writing new
ECMAScript code. … unescape[]
is not strictly deprecated [as in "removed from the Web standards"], it is defined in
Annex B of the ECMA-262 standard, whose introduction states:
The unescape[]
function computes a new string in which hexadecimal escape sequences are replaced with the character that it represents. The escape sequences might be introduced by a function like escape
. Usually,
decodeURI
or decodeURIComponent
are preferred over unescape
.
Note: Do not use unescape
to decode URIs, use decodeURI
instead.
Syntax
Parameters
str
A string to be decoded.
Return value
A new string in which certain characters have been unescaped.
Description
The unescape
function is a property of the global object.
Examples
Using unescape
unescape['abc123']; // "abc123"
unescape['%E4%F6%FC']; // "äöü"
unescape['%u0107']; // "ć"
Specifications
ECMAScript Language Specification # sec-unescape-string |
Browser compatibility
BCD tables only load in the browser
See also
HTML Escape / Unescape is a free online developer tool to escape special characters in HTML strings to their HTML entities or unescape HTML entities to their original characters.
This tool is split into two modes: HTML Escape
and HTML Unescape
.
HTML Escape - Escapes HTML special characters; i.e. &
, ,
"
, and '
in the input HTML code by converting them to their corresponding HTML entities as in the following.
&
is
converted to &
is converted to
>
"
is converted to "
'
is converted to '
Other than the aforementioned characters, nothing is escaped.
HTML Unescape - Opposite to HTML Escape
. This mode unescapes the HTML entities &
, <
, >
, "
, and '
in the input HTML code by converting them to their corresponding characters as listed below.
&
is
converted to &
<
is converted to "
is converted to "
'
is converted to '
Other than the HTML entities above, nothing is unescaped.
When you're done escaping or unescaping, you can copy the result to your clipboard using the copy button.
Tools Tools.FromDev Toggle navigation
This is a free online tool to escape and unescape HTML markup. You can copy/paste your desired HTML in below text field and hit Escape or UnEscape button. HTML escaping is used to represent special meaning characters in a HTML code. e.g. less than symbol