URL encode

This will encode or decode base64, urlencode, rot13 or htmlentities to its counterpart.

How to URL-encode text

  1. Type the value you want to put in a URL into the Input box. URL encode is already selected.
  2. Press Submit.
  3. Copy the encoded value from the Output box and paste it into your link or query string.

Examples

  • Grüße aus Köln becomes Gr%C3%BC%C3%9Fe+aus+K%C3%B6ln
  • name=Ana & Bo/ø? becomes name%3DAna+%26+Bo%2F%C3%B8%3F
  • a-b_c.d~e becomes a-b_c.d%7Ee

What gets encoded

  • Letters, digits and -, _, . are left alone.
  • A space becomes +.
  • Everything else becomes %XX codes, including &, =, /, ?, #, ~ and every byte of non-ASCII characters in UTF-8.

This is the format HTML forms use (application/x-www-form-urlencoded), the same as PHP's urlencode().

Encode values, not whole URLs

Encode each value separately and then build the URL. If you paste a complete address like https://example.com/?q=1, its :, / and ? are encoded too and it stops working as a link. That is what you want only when the whole URL is itself a parameter, such as a redirect= target.

FAQ

Why + and not %20 for spaces? Both mean a space in a query string. Inside the path part of a URL, some servers only accept %20; there, replace each + in the output with %20.

Need the other direction? Use URL decode.


Base64 decode encode

Base64 is a byte sequence of 8-bit padded ascii in mime.

More: Wikipedia and RFC 2045

URLencode decode encode

Tyically used for passing strings and variables between web pages

More info: php.net and RFC 3986


ROT13 encode

Rotates the characters 13 places. Since the basic latin1 alphabet has 26 characters, performing rot13 on a string encrypts it. Do it twice, and it's decrypted.

More info: Wikipedia and php.net

HTMLentities decode encode

Encodes or decodes all characters that have a HTML equivalent entity.

More info: php.net and w3.org