URL Encoder/Decoder
Encode or decode URL strings
About URL Encoder/Decoder
URL encoding — formally percent-encoding per RFC 3986 — converts characters that are not allowed or carry special meaning in a URL into a % followed by two hex digits. It is not Base64: it encodes only the characters that would break URL parsing, leaving safe characters untouched. This tool encodes and decodes those strings, which is essential when constructing query strings, redirect URLs, or any URL that contains user-supplied input.
Common Use Cases
Frequently Asked Questions
Why does + sometimes mean a space?
In HTML form encoding (application/x-www-form-urlencoded), + represents a space character for historical reasons. In strict RFC 3986 percent-encoding used in URL paths and query strings, a space is encoded as %20, not +. The difference matters when you are reading POST body data versus URL parameters.
Why must & be encoded inside a query parameter value?
The & character is the delimiter between query parameters. If a value itself contains &, the URL parser will treat it as the start of a new parameter. Encoding it as %26 keeps it inside the value.
What is the difference between encodeURI and encodeURIComponent in JavaScript?
encodeURI encodes a full URL and leaves the structural characters (:, /, ?, &, =, #) alone because they are valid URL delimiters. encodeURIComponent encodes everything except unreserved characters — use it for individual parameter names and values, not for entire URLs.
When do I need to double-encode?
Double-encoding is needed when a percent-encoded string will itself appear as a value in another URL — for example, a redirect_uri that already contains %20. After you encode the inner URL, its % signs become %25 so the outer URL parser leaves them intact. Decode only once on the receiving end.
Is URL encoding the same as HTML entity encoding?
No. URL encoding uses % notation (%26 for &). HTML entity encoding uses ampersand notation (& for &). They serve different contexts — use URL encoding in URLs, and HTML entities in HTML markup.