Warning: Although 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:
… All of the language features and behaviours 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 behaviours when writing new ECMAScript code. …

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.




A string to be decoded.

Return value

A new string in which certain characters have been unescaped.


The unescape function is a property of the global object.


Using unescape

unescape('abc123');     // "abc123"
unescape('%E4%F6%FC');  // "√§√∂√ľ"
unescape('%u0107');     // "ńá"


ECMAScript (ECMA-262)
The definition of 'unescape' in that specification.

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
Chrome Full support 1Edge Full support 12Firefox Full support 1IE Full support 3Opera Full support 3Safari Full support 1WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0nodejs Full support 0.1.100


Full support  
Full support
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

See also