How to URL Decode
You have a percent-encoded URL string like hello%20world and need the original text. Here is how to decode it — online, or in JavaScript, Python, PHP and the command line.
Method 1: Online (fastest)
Go to quicktoolshub.org/url-encoder-decoder, switch to Decode mode, paste your percent-encoded string, and the decoded output appears instantly. Nothing is sent to a server.
Method 2: JavaScript
// Decode a query parameter value
const decoded = decodeURIComponent('hello%20world%21');
// → "hello world!"
// Decode a full URL (preserves :, /, ?, #, &)
const decoded = decodeURI('https://example.com/path%20name?q=hello%20world');
// → "https://example.com/path name?q=hello world"Method 3: Python
from urllib.parse import unquote, unquote_plus
# Standard decoding (%20 → space)
decoded = unquote('hello%20world%21')
# → "hello world!"
# Form data decoding (+ → space, as well as %20)
decoded = unquote_plus('hello+world%21')
# → "hello world!"Method 4: PHP
// Decodes %XX and + as space (for form data)
$decoded = urldecode('hello%20world%21');
// → "hello world!"
// Decodes only %XX (leaves + as +)
$decoded = rawurldecode('hello%20world%21');
// → "hello world!"Method 5: Command line
# Linux/macOS — using Python
echo 'hello%20world%21' | python3 -c "import sys, urllib.parse; print(urllib.parse.unquote(sys.stdin.read().strip()))"
# Or using Node.js
node -e "console.log(decodeURIComponent('hello%20world%21'))"When you encounter URL-encoded strings
URL-encoded strings appear in more places than most developers expect. When you click a link with a query parameter containing spaces or special characters, the browser URL bar shows the encoded version. When you log API requests, the query string parameters will be percent-encoded. When you read a form submission in a server log, the form field values will be encoded.
Common encoded characters to recognise: %20 = space, %26 = &, %3D = =, %3F = ?, %2F = /, %40 = @. Non-ASCII characters use multiple percent sequences: %C3%A9 = é, %E2%80%93 = –.
%20 vs + for spaces
Both represent a space but in different contexts. %20 is the standard percent-encoding used in URLs. The + sign comes from HTML form encoding — when a browser submits a form, spaces in query parameters become + not %20. If you are decoding form data and see + signs, use a form-aware decoder (unquote_plus in Python, urldecode in PHP).
Decode a URL now — free, instant
Paste any percent-encoded string and get the decoded output immediately. No sign-up, no server.
Open URL Decoder →Frequently asked questions
How do I URL decode online?
Go to quicktoolshub.org/url-encoder-decoder, switch to Decode mode, paste your percent-encoded string and the decoded output appears instantly. The tool runs in your browser — no data is sent to a server.
How do I URL decode in JavaScript?
For a query parameter value: const decoded = decodeURIComponent('hello%20world'); // → 'hello world'. For a full URL: const decoded = decodeURI('https://example.com/path%20with%20spaces'); Use decodeURIComponent for individual values and decodeURI for complete URLs.
How do I URL decode in Python?
Use urllib.parse: from urllib.parse import unquote. decoded = unquote('hello%20world') # → 'hello world'. For + signs (from HTML form encoding): from urllib.parse import unquote_plus. decoded = unquote_plus('hello+world') # → 'hello world'.
How do I URL decode in PHP?
PHP has two functions: urldecode('hello%20world') decodes %XX sequences and + as space. rawurldecode('hello%20world') decodes only %XX sequences, leaving + as +. Use urldecode() for HTML form data and rawurldecode() for path segments.
Why does URL decoding show garbled text?
Garbled text usually means a character encoding mismatch. URL encoding encodes UTF-8 byte values. If the decoder treats the result as a different encoding (Latin-1, Windows-1252), non-ASCII characters appear as garbage. Make sure your decoder is set to UTF-8. Strings like %C3%A9 are a single é character — two bytes in UTF-8.
What is the difference between %20 and + for spaces?
Both represent a space, but in different contexts. %20 is the standard percent-encoding for a space (used in path segments and by encodeURIComponent/decodeURIComponent). The + sign for spaces comes from HTML form encoding (application/x-www-form-urlencoded) — query strings submitted by HTML forms use + instead of %20. When decoding form data, use a decoder that handles + as space (urldecode in PHP, unquote_plus in Python).