Easy Tutorial
❮ Event Oninput Prop Style Animationdelay ❯

JavaScript decodeURI() Function


Definition and Usage

The decodeURI() function decodes a URI which has been encoded by the encodeURI() function.

Tip: Use the encodeURI() function to encode a URI.

Syntax

Parameter Description
uri Required. A string containing the URI or other text to be decoded.

Browser Support

The decodeURI() function is supported by all major browsers.


Example

Decode an encoded URI using decodeURI():

var uri = "my test.php?name=ståle&car=saab";
document.write(encodeURI(uri) + "<br>");
document.write(decodeURI(uri));

The above example outputs:

my%20test.php?name=st%C3%A5le&car=saab
my test.php?name=ståle&car=saab

❮ Event Oninput Prop Style Animationdelay ❯