English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript decodeURI() Function

 JavaScript Global Properties/Function

decodeURI()The decodeURI() function decodes a Uniform Resource Identifier (URI).

Note:UsingencodeURI()The function encodes Uniform Resource Identifiers (URI).

Syntax:

decodeURI(uri)
var uri = "http://example.com/nxm.php?s=шеллы";
var en = encodeURI(uri);
var de = decodeURI(en);
var ans = "Encoded URI: " + en + "<br>" + "Decoded URI: " + de;

Browser Compatibility

All browsers fully support the encodeURI() function:

Function
decodeURI()IsIsIsIsIs

Parameter Value

ParameterDescription
uriThe URI to be decoded

Technical Details

Return Value:A new string representing the decoded version of the encoded URI
Exception Cases:Thrown when encodeURI contains an invalid character sequenceURIErrorException
JavaScript Version:ECMAScript 1

 JavaScript Global Properties/Function