URL Encoder & Decoder
Percent-encode text so it is safe inside a URL, or decode a percent-encoded string. Choose component mode for single values or full URL mode for complete addresses.
Component vs. full URL
URL component mode uses encodeURIComponent. It encodes reserved characters such as / ? : # & =, so use it for one value, like a query parameter. Full URL mode uses encodeURI. It leaves those structural characters alone, so a complete address keeps working. Encoding a whole URL in component mode would turn https:// into https%3A%2F%2F.
Your input stays in your browser and is not sent to a server by this page.
What it is and when to use it
URLs can only contain a limited set of characters, so spaces, accents and symbols must be percent-encoded, for example a space becomes %20. Use this tool to build safe query strings, to read an encoded link, or to debug a redirect that breaks.
How to use
- Pick component mode for a single value, or full URL mode for a whole address.
- Enter your text.
- Select Encode or Decode.
- Copy the result.
Example
Zoë & café
Zo%C3%AB%20%26%20caf%C3%A9
Tips and common mistakes
- The URL component option (
encodeURIComponent) also encodes/ ? & = #, so use it for individual values. the Full URL option (encodeURI) leaves those characters alone so the link keeps working. - Encode each query value separately, then join them with
&. Encoding a whole finished URL with the URL component option breaks it. - Seeing
%2520means the text was encoded twice. Decode once to get back to%20. - Non-ASCII characters are encoded as UTF-8 bytes, so
ébecomes%C3%A9. A stray%that is not followed by two hex digits makes decoding fail.
Frequently asked questions
Why does decoding show an error?
A % sign must be followed by two hex digits, and the bytes must form valid UTF-8. Text like 100% sure is not valid percent-encoding.
Is a space %20 or +?
Percent-encoding uses %20. A + as space only appears in HTML form data (application/x-www-form-urlencoded), which is why the decode option exists.
Does it send my URL anywhere?
No. Encoding and decoding use built-in browser functions and run locally.