Orpheus

URL Encoder and Decoder

Percent-encode a value, or read back one that has been mangled.

Options
Direction
Encode

A whole URL keeps its slashes and colons; a single value does not.

Result

Everything is processed in this tab. Nothing you paste is sent anywhere.

Every tool runs entirely in your browser. Your files are never uploaded to a server.

URL encoding replaces characters that have meaning in a URL — spaces, ampersands, slashes — with a percent sign and their hexadecimal byte value. A space becomes %20. It lets arbitrary text travel safely inside an address.

How to use URL Encoder & Decoder

  1. Paste the text or URL. Encoding and decoding both happen as you type.
  2. Choose the scope. A single value escapes everything; a whole URL keeps its structure intact.
  3. Copy the result. Use the encoded value in a query string, or read the decoded one.

About URL encoding

Percent-encoding exists because URLs have a grammar, and a handful of characters do structural work in it. A question mark starts the query, an ampersand separates parameters, a hash begins the fragment, a slash divides path segments. Any of those appearing inside a value would be read as punctuation rather than as data, so they are replaced with a percent sign and the hexadecimal value of their bytes. The distinction people get wrong is between escaping a whole address and escaping one value inside it. If you percent-encode an entire URL as though it were a value, the slashes and the colon become %2F and %3A and the address stops being an address. If you fail to encode a value, an ampersand inside it silently splits one parameter into two and the receiving system reads something you did not send. The other frequent trap is double encoding, usually caused by two layers of code each helpfully escaping the same string. The symptom is unmistakable once you know it: %2520 in place of a space, because the % of %20 was itself escaped to %25. Non-ASCII text is encoded as UTF-8 bytes, so a single accented character becomes two percent-escapes and an emoji becomes four.

Frequently asked questions

What is the difference between encoding a value and a whole URL?
Encoding a value escapes every reserved character, including / : ? and &, because inside a parameter those are data. Encoding a whole URL leaves them alone, because there they are structure. Using the wrong one either breaks the address or fails to escape the value.
Why does my URL show %20 instead of spaces?
Because a raw space is not legal in a URL and something along the way escaped it. %20 is the correct encoding for a space. You may also see +, which means a space in form-encoded data specifically, and nowhere else.
Why did decoding fail?
A percent sign must be followed by exactly two hexadecimal digits. A literal percent in text — "100% private" — is invalid when treated as encoded, which is why it has to be escaped to %25 before it goes into a URL.
Does encoding twice cause problems?
Yes, and it is a common bug. Encoding an already-encoded string turns each % into %25, so %20 becomes %2520. The result looks encoded but decodes to the wrong thing. Decode once first if you are unsure of a value’s state.

Last updated