URL Encoder / Decoder
Encode and decode URLs and query parameters.
URL Encoder and Decoder helps you safely convert special characters into their percent-encoded equivalents for use in URLs, and decode percent-encoded strings back to human-readable text. Special characters such as spaces, &, =, and # have specific meanings in URLs and must be encoded to be transmitted correctly.
Paste a URL or query parameter value into the encoder and the tool replaces each unsafe character with a % followed by its two-digit hexadecimal code. The decoder reverses the process, turning sequences like %20 back into a space and %26 back into &.
Common use cases include building query strings for API requests, debugging webhook payloads, and fixing broken links that contain unencoded special characters. All processing takes place in your browser with no data sent externally.
Frequently Asked Questions
Code Implementation
from urllib.parse import quote, unquote, quote_plus, urlencode, urlparse
# Encode a single value (for use in path or query value)
raw = "hello world & more/stuff"
encoded = quote(raw)
print(encoded) # hello%20world%20%26%20more%2Fstuff
# query-string style: spaces become +, / is also encoded
qs_encoded = quote_plus(raw)
print(qs_encoded) # hello+world+%26+more%2Fstuff
# Decode
decoded = unquote(encoded)
print(decoded) # hello world & more/stuff
# Encode a full query string from a dict
params = {"name": "Alice Smith", "city": "São Paulo", "q": "a+b=c&d"}
query = urlencode(params)
print(query) # name=Alice+Smith&city=S%C3%A3o+Paulo&q=a%2Bb%3Dc%26d
# Parse a URL and re-encode its components
url = "https://example.com/search?q=hello world&lang=en"
parsed = urlparse(url)
print(parsed.query) # q=hello world&lang=en (raw)Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.