JS DOM: decodeURI

By Xah Lee. Date: . Last updated: .

decodeURI is a string property of the the Global Object.

decodeURI is the inverse of encodeURI

// decode a URL that contains space
console.log(decodeURI("http://example.com/a%20b.jpg") === "http://example.com/a b.jpg");
// true

JavaScript DOM, Get URL, Set URL