URL Encode/Decode

Why is percent encoding still confusing in 2025?

Links look simple in a deck, and then a real customer query comes through with a city name, a product title, or a partner code that needs to travel through email, ad networks, and mobile apps without breaking. A percent encode step is how you make a human string safe for a URL, and the business pain is the afternoon where attribution drifts, a landing page 404s, or a UTM value silently drops because a character in the value was not encoded the way the server expects. For marketers and product owners, a free online percent encode and decode pass is a fast way to build a test link, compare the output to a spec example, and stop guessing when two teams both say they used the right base URL. The emotional cost of tiny URL mistakes is outsized, because the dashboard looks like nothing changed while money moved in a direction nobody planned. A URL encode online workflow is also a shared language: you can name which part of the link was a path, which was a query value, and which layer of the stack gets encoding first, so you are not double encoding in one tool and unencoding in another by accident. The frustration is the Friday A/B test where the variant link works in preview but not in a real client, and everyone blames the channel before anyone looks at the string. A careful encode in the browser is not a full analytics strategy, but it is a concrete next step. When you are ready, split your work: encode the value, not a whole prebuilt string, unless a helper is designed for that, then test the final link in a clean window, because transport rules differ between spaces, pluses, and percent bytes in ways that are easy to get wrong if you are in a rush.

How to percent-encode a URL piece

  1. Split the work: encode a query value differently from a full URL, because partial encoding in the middle of a prebuilt string can double-encode and create garbage.
  2. Run encode on the value that actually contains the special character, not the static parameter name, if your spec separates those.
  3. Test the final URL in an incognito window with network logging, and compare against a spec example before you hand it to paid traffic.

Percent encode FAQ

Is %20 the same as + in a query string?
In application/x-www-form-urlencoded, plus often means space, but in a path it does not. Know which layer you are in, because libraries pick different defaults without asking your product manager.
What about Unicode and internationalized domain names?
Hostnames and punycode are a different concern than value encoding. Talk to your platform team about IDNA rules before you “fix” a link by eye alone in a long country name case.
How do I avoid double encoding?
Keep a source-of-truth object of raw values, encode once at the API boundary, and never copy an already encoded string back through an encoder in a different layer without a clear plan.
More versions