URL Encode / Decode

How do I URL-encode text?

How it is calculated

The tool applies RFC 3986 style percent-encoding to the whole text you enter. Letters A–Z and a–z, digits 0–9 and the four characters - _ . ~ are left as they are. Every other character is first turned into UTF-8 bytes, and each byte is written as % plus two hexadecimal digits. A space becomes %20 (not a plus sign), and a letter such as ç, which takes two bytes in UTF-8, becomes two groups. In decode mode the reverse is done: each %XX sequence is turned back into its byte. A plus sign is left alone in decoding, it is not converted to a space. Empty text gives no result.

Worked example

Encode the text çay & simit?. The letter ç is two UTF-8 bytes, C3 A7, giving %C3%A7. The letters a and y stay. Each space becomes %20, the ampersand becomes %26, and the question mark becomes %3F. Putting it together gives %C3%A7ay%20%26%20simit%3F. Switching to decode mode with that string returns the original text.

Try this example →

Common mistakes

  • Encoding a complete URL. Colons, slashes and question marks are encoded too, so https:// becomes https%3A%2F%2F and stops working as a link. Encode only the parameter value or path segment.
  • Encoding the same text twice: the percent signs themselves become %25, so a space turns into %2520.
  • Expecting a plus sign for spaces, as in HTML form submissions. This tool writes %20, and in decode mode a plus sign stays a plus sign.
  • Decoding text that was not encoded or is cut off in the middle of a sequence; stray percent signs followed by non-hex characters are left unchanged and the result may look wrong.

About this calculator

This tool converts text to and from percent-encoding (also called URL encoding), the scheme that represents characters unsafe for a URL — spaces, ampersands, question marks, accented and non-Latin letters, and so on — as a percent sign followed by their hexadecimal byte value, such as a space becoming %20. URLs can only reliably carry a limited set of ASCII characters, so anything outside that set has to be encoded or the URL risks being truncated, misparsed, or having its query parameters mixed up.

It is used by web developers building query strings and API requests by hand, by anyone needing to share a link that contains special characters or non-English text in a parameter, and by people decoding a long, unreadable URL they received to see what it actually says. It's a routine step whenever user-generated text — a search term, an email address, a file name — needs to be embedded inside a URL rather than sent as plain text.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Because this tool leaves the plus sign alone when decoding and writes spaces as %20, it matches path segments and query values but not form-style data where a plus means a space. If decoded text looks wrong, check that first. Also encode single values, not a whole address: the slashes, colons and question marks of a full URL would be escaped too. Which kind of string do you most often need to encode?

Popular calculators

All Calculators