URL Encoder and Decoder

Percent-encode a value for a query parameter or decode a URL component back to readable text.

URL Encoder and Decoder

Encode one value, not an entire URL

If a search term contains a space or an &, encode just the term. If you also encode the address’s ?, the = after a parameter name, or the & between parameters, they no longer work as separators.

Example: A search term with a plus sign and an ampersand

Encoding salt + pepper& gives salt%20%2B%20pepper%26. Use it in ?q=salt%20%2B%20pepper%26&page=2, where only the & before page acts as a separator. Decode just the encoded value to get salt + pepper& back.

When decoding fails or spaces do not come back

Decoding fails when a percent sign is not followed by two hex digits, as in %2, or when the encoded bytes do not form valid UTF-8. Check whether the value was cut off. To include a literal percent sign, encode it as %25.

This tool encodes spaces as %20 and leaves literal + characters unchanged when decoding. For form submission data that uses + for spaces, use a form decoder. Encoding a value twice turns %20 into %2520, so check that you start with the original text.