| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.
decodeURIComponent() encodeURIComponent Uniform Resource Identifier(URI) .
function containsEncodedComponents(x) {
// ie ?,=,&,/ etc
return decodeURI(x) !== decodeURIComponent(x);
}
console.log(containsEncodedComponents("%3Fx%3Dtest")); // ?x=test
// Expected output: true
console.log(containsEncodedComponents("%D1%88%D0%B5%D0%BB%D0%BB%D1%8B")); //
// Expected output: false
decodeURIComponent(encodedURI);
encodedURIUniform Resource Identifier(URI) .
.
URIError ( " malformed URI sequence ") .
URI ( ) .
decodeURIComponent("JavaScript_%D1%88%D0%B5%D0%BB%D0%BB%D1%8B");
// "JavaScript_"
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-decodeuricomponent-encodeduricomponent |
This page was last modified on 2025 2 11 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |