How to use it
- Choose a mode: Encode text / parameter, Encode full URL or Decode.
- Paste your text into Input. The result appears as you type; press Copy to take it.
- When the input is a full web address, URL parts splits it into protocol, host, port, path, query and fragment, and lists every query parameter with its decoded value.
When to use which mode
- Encode text / parameter (
encodeURIComponent): for a single value you put inside a URL, like a search term. It encodes everything special, including/ ? & =. - Encode full URL (
encodeURI): for a whole address with spaces or accents. It keeps the characters that give a URL its structure. - Decode: turns
%20,%C3%A9and friends back into readable text. Tick Treat + as space for form data and query strings.
What is percent-encoding?
URLs can only contain a limited set of characters. Everything else is written as % followed by two hexadecimal digits per byte of its UTF-8 code. A space becomes %20 and "é" becomes %C3%A9.
Common encoded characters
- space →
%20(or+in form data) &→%26·=→%3D·?→%3F/→%2F·#→%23·%→%25- é →
%C3%A9· 😀 →%F0%9F%98%80
FAQ
Why do I get "URI malformed"?
The text contains a % that isn't followed by a valid code, like 100%. Encode the text first, or fix the stray percent sign.
Should a space be %20 or +?
Both are common. %20 works everywhere in a URL. + means a space only in query strings sent by HTML forms, so tick Treat + as space when you decode those.
Is URL encoding a form of encryption?
No. Anyone can decode it in a second. It only makes text safe to put in an address, so never put passwords or other secrets in a URL.