URL Encoder

Paste text, choose where it will go in the URL, and press Encode URL. Unsafe characters become % codes, and a table shows every character that was encoded.

Try an example
Encoding mode

About this URL encoder

A URL may only contain a small set of characters, and characters such as ?, &, =, #, and / have special jobs in it. Percent-encoding writes any other character as % followed by its UTF-8 bytes in hex, so a space becomes %20 and é becomes %C3%A9. Use URL component mode to encode a single query value or path part, which is what encodeURIComponent does in JavaScript; Query string mode for HTML form style with + for spaces; Path mode to keep the slashes of a path; and Full encoding when every symbol must be encoded.

How to URL-encode text

  1. Paste the text. Paste a query value, a path, or any text, or press an example. An example only fills the box.
  2. Pick the encoding mode. URL component suits most cases; Query string writes spaces as +; Path keeps /; Full encoding encodes every symbol.
  3. Press Encode URL. The encoded text appears with a table of each character that was encoded and its % code.
  4. Copy the result. Press Copy encoded text and paste it into your URL or code.

Frequently asked questions

Should a space be %20 or +?

Both mean a space in the query part of a URL built by an HTML form. Use %20 (URL component mode) everywhere else, such as in paths. Query string mode writes spaces as +.

Why is my whole URL full of %2F and %3A?

URL component mode encodes / and :, because it is meant for one value inside a URL, not a whole URL. Encode only the parts that change, such as a search term, or use Path mode for a path.

Which characters are never encoded?

In URL component, Query string, and Path modes: letters A–Z and a–z, digits, and - _ . ~, which RFC 3986 calls unreserved. Path mode also keeps /. Full encoding keeps only letters and digits.

How are accented letters, Chinese characters, and emoji encoded?

As their UTF-8 bytes, each written as %XX. é becomes %C3%A9, 東 becomes %E6%9D%B1, and 👍 becomes %F0%9F%91%8D.

How do I reverse the encoding?

Paste the encoded text into the URL Decoder.