Favorites

JavaScript decodeURI() Function

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
decodeURI()
JavaScript Global functionThis function is supported by all modern browsers.
Updated 28th November 2026

The decodeURI() function decodes a complete URL that was encoded with encodeURI().

Description

The decodeURI() function decodes a full URL. It doesn't decode escape sequences for characters that have special meaning in a URL, such as %26 (&), because decoding them would change the URL's structure. Use decodeURIComponent() for individual values.

Characters left encoded include ; / ? : @ & = + $ , #, so a decoded URL keeps the same structure as the encoded one. Malformed escape sequences throw a URIError.

It's mainly useful for displaying an encoded URL in a more readable form, for example showing non-ASCII characters in paths. To read the parts of a URL, the URL object gives decoded values for paths and parameters more reliably.

Syntax

decodeURI(encodedURI)

Parameters

  • encodedURIA URL that was encoded with encodeURI().

Return Value

The decoded URL.

Exceptions

  • URIErrorThrown if the string contains invalid percent-encoding.

Example

console.log(decodeURI('https://example.com/caf%C3%A9?a=1%262'));

Browser Support

The following information will show you the current browser support for the decodeURI() function. Hover over a browser icon to see the version that first introduced support for this function.

This function is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee