URL Encode / Decode
Encodes and decodes values for use in URLs — query parameters and path segments.
This tool only encodes values (like search parameters). If you paste a whole URL, characters like : / ? & will also be encoded, making it invalid.
What is URL Encoding
URL Encoding (or percent-encoding, RFC 3986) is how a URL represents characters that aren't safe inside it — space, accented letters, reserved symbols (: / ? & =, among others) — using a "%" sequence followed by two hexadecimal digits representing the corresponding UTF-8 byte. It's what lets any text, in any language, travel inside a format that originally only planned for a restricted subset of ASCII characters.
When to use it
Whenever a value — not a whole URL — is inserted into a URL and may contain characters outside the safe set: a search term someone typed, an email address, an accented name, any free text. Typical cases: ?name=João Silva, ?q=C# Tutorial, city=São Paulo, redirect_uri=https://mysite.com/callback. There's no need to encode an already-valid URL — only the values that make it up, before assembling it.
Difference between %20 and +
%20 is the standard encoding (RFC 3986) for the space character — it works anywhere in a URL, with no ambiguity. The "+" character as space is a convention specific to application/x-www-form-urlencoded (the format used by traditional HTML forms), where "+" is reserved just for that. That's why this tool's Encode always produces %20 (the more broadly correct form), while Decode accepts both, because both show up in real-world use.
Difference between encodeURIComponent and encodeURI
encodeURIComponent (used by this tool) encodes a single value, escaping URL-reserved separators too (: / ? & =) — meant for a parameter or segment, never a whole URL. encodeURI encodes a full URI and preserves those separators, since they serve a structural role in it. Pasting a whole URL into a tool built on encodeURIComponent, like this one, always makes it invalid.
Where you'll run into it day to day
In the query string of practically any REST API (?name=value), in OAuth flow parameters (redirect_uri, state), in mobile app deep links, in HTML forms submitted via GET, and in any system that needs to carry free text — names, addresses, search terms — as part of a URL. Full example: GET /users?name=Jo%C3%A3o%20Silva.
Frequently asked questions
Because the space character isn't safe inside a URL. %20 is the percent-encoding representation of its ASCII/UTF-8 value (0x20), which any system compliant with RFC 3986 knows how to interpret unambiguously.
Both represent space, but in different contexts: %20 is the RFC 3986 standard, valid anywhere in a URL; + is a convention specific to application/x-www-form-urlencoded (HTML forms). This tool always produces %20 on Encode, but accepts both on Decode.
Technically yes, but the result stops being a valid URL — separators like : / ? & get encoded too, since this tool treats the input as a single value, not a whole URL. Use it to encode just the variable part (a parameter, a name) before assembling the final URL.
Because encoding goes through UTF-8 first: "ã", for example, takes two bytes in UTF-8 (0xC3 0xA3), and each byte becomes its own %XX sequence. That's why a single accented character usually turns into two (or more) % sequences.
Whenever a value that might contain a space, accented letters, or reserved characters is inserted into a URL — search parameters, emails, names, free text. It isn't necessary for values made up only of letters, digits, and the already-safe symbols (- _ . ~).