URL Encoder / Decoder
Percent-encode or decode URLs and URL components instantly.
What is URL Encoding?
URL encoding (also called percent-encoding) converts characters that are not allowed in URLs into a % followed by two hexadecimal digits representing the character's byte value. For example, a space becomes %20, and the & character becomes %26.
URL encoding is necessary because URLs can only contain a limited set of ASCII characters. When you include data (like a search query, a filename, or a JSON value) in a URL, special characters must be encoded to avoid being interpreted as URL structure characters.
Component mode (encodeURIComponent) encodes everything except unreserved characters — use this for individual query parameter values, path segments, or any string that should be treated as data. Full URL mode (encodeURI) preserves the structural characters of a URL (: / ? # & = @) — use this when encoding an entire URL that should remain navigable.
Frequently Asked Questions
%20 is the RFC 3986 standard percent-encoding for a space and works everywhere in a URL. The + character represents a space only in the query string portion of a URL (after the ?), as defined by the HTML form encoding standard (application/x-www-form-urlencoded). Using + in a URL path means a literal plus sign, not a space. When in doubt, use %20.
A–Z a–z 0–9 - _ . ~. The reserved characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) have special meaning in URL structure — they can appear unencoded in the right context but must be encoded when used as data values.
%20 into %2520 (because % itself encodes to %25). This causes broken URLs and 404 errors. Avoid it by always decoding first before re-encoding, or by being disciplined about encoding each piece of data exactly once before assembling the URL. The Decode direction on this tool will unencode a double-encoded string in one step.