🔗 URL Encoder / Decoder

Encode special characters for URLs or decode percent-encoded strings.

Related Tools

Complete Guide to URL Encoding and Decoding

URL encoding (also called percent-encoding) converts characters that have special meaning in URLs into a form that web servers and browsers handle safely. Spaces, ampersands, quotes, non-ASCII characters, and reserved syntax all need encoding before they appear in a query string or path. Our URL encoder/decoder runs entirely in your browser.

Why URLs Need Encoding

Reserved characters such as ?, #, &, = and / have structural meaning in URLs. Embedding them as literal data would confuse the parser. Percent-encoding replaces each byte with %XX where XX is its hexadecimal value. For example a space becomes %20 and an ampersand becomes %26. UTF-8 encoded text uses several percent-encoded bytes per non-ASCII character.

Using the URL Encoder Tool

Paste your raw text or your encoded URL string, choose Encode or Decode, and copy the result. The operation runs locally so no part of your URL is sent to any server — useful when the URL carries authentication tokens or personally identifiable information.

Common Mistakes to Avoid

Double-encoding (encoding an already encoded URL) is one of the most common mistakes. Always decode first before re-encoding. Another pitfall is encoding the path separator "/" inside the path component, which can break routing on some servers. Encode each query parameter value separately rather than the whole URL at once.

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI keeps URL syntax characters (such as / and ?) intact and only escapes obvious unsafe characters. encodeURIComponent escapes everything that is not strictly alphanumeric and is used for individual parameter values.

Why does my decoded text look garbled?

Usually because the original encoding was not UTF-8. Try interpreting the bytes as Latin-1 or the source language encoding.

Are spaces always encoded as %20?

In paths yes. In query strings the older form encodes a space as "+". Both are accepted by most servers but %20 is unambiguous.