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.
unescape() is not strictly deprecated
(as in "removed from the Web standards"), it is defined in
of the ECMA-262 standard, whose introduction states:
… 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() 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
decodeURIComponent are preferred over
Note: Do not use
unescape to decode URIs,
A string to be decoded.
A new string in which certain characters have been unescaped.
unescape function is a property of the global object.
unescape('abc123'); // "abc123" unescape('%E4%F6%FC'); // "äöü" unescape('%u0107'); // "ć"
|ECMAScript Language Specification |
BCD tables only load in the browser