AD · 728×90
Google AdSense / Яндекс.Директ
Google AdSense / Яндекс.Директ
URL
decodeURIComponent()
Decodes a percent-encoded URI component
Percent-encoded string to decode
decodeURIComponent(encodedURI)
RESULT
— click Run or press Ctrl+Enter —
Parameter Reference
| Parameter | Type | Status | Description |
|---|---|---|---|
| encodedURI | string | required | Percent-encoded string to decode |
About
decodeURIComponent() converts percent sequences (%XX) back into their original characters. Used when parsing URL query parameters, processing history API data, or decoding data from GET requests. Invalid percent sequences throw URIError — always use try/catch on untrusted input.
Browser Support
Introduced in ES3 (1999) alongside encodeURIComponent. Supported by all browsers without exception.
Tips & Gotchas
- Invalid sequences throw URIError — use try/catch
- for query string parsing, URLSearchParams is more convenient
- do not decode full URLs — use decodeURI() for that.