URL encoder / decoder
Encode or decode URLs and text using percent encoding.
How to use
Percent-encoding replaces characters that carry a meaning inside a URL, such as spaces, &, ?, # and accented letters, with a % followed by their byte values, so the text survives being pasted, logged and parsed. Paste text and choose Encode or Decode; the result appears below with a Copy button.
Encode treats everything you paste as one value, the way a single query parameter or path segment must be encoded. Only letters, digits and - _ . ! ~ * ' ( ) are left as they are; everything else is encoded, including : / ? # & and =. That is exactly what a value needs, but it is not how to encode a whole address: https://example.com/a b becomes https%3A%2F%2Fexample.com%2Fa%20b, which no longer works as a link. Encode the parts that need it and keep the separators.
Characters outside plain ASCII are first converted to UTF-8 and then encoded byte by byte, so é becomes %C3%A9 and an emoji such as 😀 becomes four %-codes (%F0%9F%98%80).
Decode turns %-codes back into text. A + is left as a +, because a plus only means a space in form-encoded data; and a % that is not followed by two valid hexadecimal digits, as in 100%, cannot be decoded and is reported as invalid. Everything runs in your browser.
Example
Spaces become %20 and reserved URL characters are percent-encoded. Decode recovers the original text.
hello worldhello%20worlda&b=c as one valuea%26b%3Dccafécaf%C3%A9https://example.com/?q=1https%3A%2F%2Fexample.com%2F%3Fq%3D1: fine as a value inside another URL, wrong as a link on its own.a+b%20c → Decodea+b c: the %20 becomes a space, the + stays.
Frequently asked questions
Why do I sometimes see + instead of %20?
A plus means a space only in the form-urlencoded format that HTML form submissions use. Elsewhere in a URL a plus is a literal plus, which is why this tool encodes a space as %20 and leaves a + unchanged when decoding.
Why does one accented letter become six characters?
It is converted to UTF-8 first and then encoded byte by byte. The letter é is two bytes, so it becomes %C3%A9.
Why does decoding fail?
Usually because the text contains a % that is not part of an encoded character, such as 100%, or a sequence that is not valid UTF-8. Encode the lone % as %25 first.
Should I encode a whole URL before sharing it?
No. A URL that already works should be shared as it is; encoding it again turns its separators into codes and breaks it. Only values placed inside a URL need encoding.