URL Encoder and Decoder

URL encoding replaces unsafe characters with a percent sign and two hex digits. A space becomes %20, and "a&b" becomes a%26b. Decoding caf%C3%A9 gives café.

Did this solve your problem?
Prefer us on Google

How to use

  1. Choose Encode or Decode, then type or paste text into the input box.
  2. Pick Component to encode a single value such as a search term. Pick Full URL to encode a whole address and keep characters like : / ? & = # as they are.
  3. Tick the plus option if the text uses + for spaces, as HTML forms do. The result updates as you type.
  4. If the input is a URL or a query string, the table under the result lists each parameter with its decoded key and value. Press Copy to copy the output, or Use as input to flip the result back for another round.

How it works

Percent encoding turns each unsafe character into its UTF-8 bytes, and writes every byte as a percent sign followed by two hex digits. The letter é is the two bytes C3 A9, so it becomes %C3%A9. An emoji takes four bytes, so it becomes four %XX groups.

Component mode uses encodeURIComponent. It keeps only letters, digits and - _ . ! ~ * ' ( ) and escapes everything else, including / ? & = : and #. Use it for one value inside a URL. Full URL mode uses encodeURI, which also keeps the characters that give a URL its structure (; , / ? : @ & = + $ #), so it is meant for a whole address.

Decoding reverses this. If the text holds a % that is not followed by two hex digits, or the bytes do not form valid UTF-8, the browser refuses to decode it and the tool shows an error. In the query table such a part is kept as written and marked in red, so one bad value does not hide the rest.

A plus sign means a space only in form data (application/x-www-form-urlencoded) and in most query strings. In a path, + is a literal plus. The query table always reads + as a space, while the main decoder does so only when you tick the option.

Common characters

CharacterEncodedNote
Space%20 (or +)+ only in query strings
&%26Separates parameters, so encode it inside a value
=%3DSeparates key from value
?%3FStarts the query string
#%23Starts the fragment
/%2FPath separator
%%25The escape character itself
+%2BA literal plus must be encoded

FAQ

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent escapes the characters that separate parts of a URL (/ ? & = : #), so it is safe for a single value. encodeURI leaves them alone, so it can encode a full address without breaking its structure.

Why does a space turn into %20 or into a plus sign?

%20 is the standard encoding of a space and works everywhere. A plus sign is the older form-encoding for a space and is only valid in query strings. The plus option writes + instead of %20 when you encode.

Why does decoding fail with a malformed error?

The text has a lone % sign, a % followed by non-hex characters, or bytes that are not valid UTF-8, such as %C3 on its own. Fix or remove the broken part. The query table still shows the rest of the parameters.

Does it handle non-English text and emoji?

Yes. Text is converted to UTF-8 first, so any language and emoji round trip correctly.

Is my URL sent to a server?

No. Everything runs in your browser. Links with tokens or personal data never leave your device.