Encode URL - Free Online URL Encoder

How to use URL Encoder tool?

Three simple steps:

  1. Type or paste your URL to the first input.

  2. Click on "Encode URL" button.

  3. Encoded URL will appear in the second input.

What is URL encoding and why is it needed?

URL encoding is a process of converting a string into a valid URL format. This is necessary because some characters are not allowed in a URL, such as spaces and certain punctuation marks. URL encoding replaces these characters with a % followed by their hexadecimal value. For example, a space would be encoded as %20. If you try to encode tada emoji (🎉) you'll get "%3D%F0%9F%8E%89". URL encoding is often necessary when you are submitting request with query string that contains a data with UTF-8 characters to a server. The server will not be able to correctly process the data if it contains invalid characters. You can find a full list of allowed and disallowed characters in the URL specification. Some browsers will automatically encode URLs before sending them to the server.

How to encode URL with JavaScript?

This can be done by using the "encodeURIComponent()" function. The function accepts a single argument (string) and returns a string (encoded URL). Thats it!

Ok, I encoded my URL. How to decode it?

If you need to do the opposite operation i.e. decode encoded URL, please use URL decoder tool.