JavaScript decodeURI() Function
- Previous Page decodeURI()
- Next Page decodeURIComponent()
- Go to the Previous Level JavaScript Global Reference Manual
Definition and usage
decodeURI()
Function used to decode URI.
Tip:Please use encodeURI()
Function to encode URI.
Example
Decode the URI after encoding it:
var uri = "my test.asp?name=ståle&car=saab"; var enc = encodeURI(uri); var dec = decodeURI(enc); var res = enc + "<br>" + dec;
Syntax
decodeURI(uri)
Parameter value
Parameter | Description |
---|---|
uri | Mandatory. The URI to be decoded. |
Technical details
Return Value: | String representing the decoded URI. |
---|
Browser Support
Function | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
decodeURI() | Support | Support | Support | Support | Support |
- Previous Page decodeURI()
- Next Page decodeURIComponent()
- Go to the Previous Level JavaScript Global Reference Manual