URL Encoder / Decoder

Encode and decode URLs and text

← Back to ToolMitra
Result will appear here

About the URL Encoder Decoder

URL encoding replaces unsafe characters such as spaces, &, ? and non-English letters with percent codes so that a link works correctly. This tool encodes text for use in URLs and decodes percent-encoded text back to normal. Developers and marketers use it for query strings, redirects and tracking links.

How to use the URL Encoder Decoder

  1. Paste your text or URL into the box.
  2. Click Encode or Decode.
  3. Copy the result.

Frequently asked questions

Why does a space become %20?

A space is not allowed inside a URL, so it is replaced with its percent code, which is %20.

Should I encode the whole URL?

Usually you encode only the values of query parameters. Encoding the entire URL also changes characters like : and /, which can break the link.

How the URL Encoder & Decoder works

URLs can only contain a limited set of characters. Other characters, such as spaces, &, = and non-English letters, are replaced with a percent sign followed by their hexadecimal code. This is called percent-encoding. A space becomes %20, and & becomes %26.

This tool uses encodeURIComponent, which encodes every character except letters, digits and - _ . ! ~ * ' ( ). It is designed for encoding individual values, such as a search term in a query string.

Worked examples

Encode a value: tea & biscuits = 50% becomes tea%20%26%20biscuits%20%3D%2050%25.

Full URL: If you encode https://example.com/my page?x=1 completely, the colon, slashes and question mark are also encoded: https%3A%2F%2Fexample.com%2Fmy%20page%3Fx%3D1. Encode only the parts that need it, such as the value after ?q=.

Tips and common mistakes

More questions about the URL Encoder & Decoder

Why do spaces become %20?

A space is not allowed in a URL, so its ASCII code (20 in hexadecimal) is written after a percent sign.

Should I encode the whole URL?

Usually not. Encode the individual parameters and keep the structure of the URL intact.

Does it support Hindi and emoji?

Yes. Non-ASCII characters are converted to their UTF-8 bytes and then percent-encoded.

What is the difference between encoding and decoding?

Encoding converts special characters into % codes. Decoding turns the % codes back into normal characters.

Related tools

← Back to all tools