How to use
- Paste a URL or some text into the input.
- Choose encodeURIComponent for parameter values, encodeURI for full URLs or Decode to reverse.
- Check the URL breakdown below: components and parameters, already decoded.
- Copy the result with one click.
Use cases
- Building links with parameters that contain spaces, accents, & or =.
- Reading redirect URLs and OAuth callbacks with nested parameters.
- Debugging UTM and tracking parameters in marketing campaigns.
- Checking how a form serialized the submitted fields.
Technical concepts
encodeURIComponent versus encodeURI
encodeURIComponent escapes every reserved character (; , / ? : @ & = + $ #), which is right for individual parameter values. encodeURI keeps those characters because it assumes you are encoding a complete URL, escaping only what is illegal in it, such as spaces and accents.
Percent-encoding
Every byte outside the allowed set is written as % followed by two hexadecimal digits. Non-ASCII characters are converted to UTF-8 first, which is why é becomes %C3%A9 (two bytes).
The + sign in query strings
In the application/x-www-form-urlencoded format used by HTML forms, a space is encoded as +. The decoder on this page treats + as a space, matching URLSearchParams.
Frequently asked questions
Why do I get 'URI malformed' when decoding?
The input contains a % that is not followed by two valid hexadecimal digits, or a sequence that does not form valid UTF-8, such as an incomplete %E0%A4.
Should I encode the whole URL with encodeURIComponent?
No. That would escape :// and /, breaking the URL. Encode only the parameter values with encodeURIComponent.
Are repeated parameters shown?
Yes. Each occurrence of a repeated key, such as tag=a&tag=b, gets its own row in the table.