URL Encoder & Decoder
Percent-encode and decode URLs in your browser. Choose encodeURIComponent or encodeURI, handle + as space, and break any URL into its parts.
Component mode (encodeURIComponent) is the safe default; whole-URL mode keeps / ? & : @ intact.
encodeURIComponent — for one piece of a URL: a query value, a path segment, a form field. Escapes / ? : @ & = + $ , # so they can’t be mistaken for URL structure. Use this if you’re not sure.
Result
Paste a URL or a value to encode.
How to use
- Choose Encode or Decode, then paste your URL or value into the input box.
- When encoding, pick ‘Component (encodeURIComponent)’ for one value or ‘Whole URL (encodeURI)’.
- Tick ‘Treat + as space’ when decoding form data, or ‘Process each line separately’ for lists.
- In the URL inspector, check protocol, host and path, edit a value and press ‘Apply edits’.
- Copy the result, or press ⇄ Swap to move it into the input and flip the direction.
FAQ
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent escapes the structural characters / ? : @ & = + $ , #, so use it for one piece of a URL such as a query value. encodeURI leaves those alone so a whole URL still works. Encoding a full URL with the component function is the most common URL-encoding mistake — that is why we make you pick.
Why does my decoded text have + signs instead of spaces?
HTML forms encode a space as + in query strings, while %20 is used elsewhere. Our "Treat + as space" option is on by default and matches URLSearchParams. Turn it off if a literal + in your data matters.
What does "double-encoded" mean?
The value was percent-encoded twice, so %20 became %2520. Decoding once still leaves %20 behind. We detect this and offer a second decode. It usually means a value was encoded by both your code and a framework.
Related tools
More Developer tools: Developer