Developer
Aug 4, 2026
A URL Inside Another URL Needs Different Encoding Than a Standalone URL — OAuth redirect_uri, Double Encoding, and RFC 3986
OAuth's redirect_uri must be percent-encoded when it appears as a query parameter value — because its own URL characters (://, /, ?) would otherwise be interpreted as URL structure rather than literal data. Here's RFC 3986's three character categories (unreserved never encoded, reserved encoded when used as data), why `+` means space in form encoding but not URI encoding, the double encoding signature (%25 in a URL), and the difference between JavaScript's encodeURI() and encodeURIComponent().