Skip to content
EverythingTool logo
Developer

URL Encoder / Decoder

Percent-encode or decode URLs and query parameters, and break a URL into its parts.

URL breakdown

Protocol
https:
Host
everythingtool.in
Path
/search
Query
q = chai
Query
samosa =
Query
city = मुंबई
Share this tool WhatsApp X Facebook

How to use the URL encoder

  1. Choose Encode or Decode.
  2. Pick a scope: Component for a single query value or path segment, or Full URL to keep the URL's structure (: / ? & = #) intact.
  3. Paste your text. The result updates instantly, and valid URLs are broken down into host, path and query parameters.

Why URLs need encoding

URLs can only contain a limited set of ASCII characters. Characters like spaces, quotes, &, # and non-English text (Hindi, Tamil, emoji) must be converted to %XX sequences — the UTF-8 bytes written in hexadecimal. Without encoding, a value like chai & samosa would break the query string, because & starts a new parameter.

Common encodings

CharacterEncodedCharacterEncoded
space%20&%26
/%2F=%3D
?%3F#%23
+%2B@%40
₹%E2%82%B9म%E0%A4%AE

encodeURIComponent vs. encodeURI

In JavaScript, encodeURIComponent() is what you want 95% of the time — use it on each query value before joining it into a URL. encodeURI() is for a complete URL that may contain unsafe characters but whose structure should be preserved. Using encodeURI on a query value is a classic bug: it leaves & and = unencoded. In modern code, URLSearchParams handles this for you.

The equivalents in other languages are urllib.parse.quote() in Python, rawurlencode() in PHP and URLEncoder.encode() in Java (which uses + for spaces).

Need a different encoding? Try the Base64 encoder.

When developers need this

  • Building query strings that contain spaces, ampersands or non-English text.
  • Debugging a link that arrives with percent codes such as %20 or %2F.
  • Sending data in a form post or an API request.
  • Reading a tracking link to see where it really points.

Double encoding

If you see %2520, the text has been encoded twice: %20 became %2520because the percent sign itself was encoded. Decode once more to recover the original, and fix the code that encodes twice.

Encoding and decoding happen in your browser, so nothing you paste is sent anywhere.

Frequently asked questions

What is URL encoding?

URL encoding (percent-encoding) replaces characters that aren't allowed or have special meaning in URLs with a % followed by their hexadecimal byte value. A space becomes %20 and & becomes %26.

What's the difference between encoding a component and a full URL?

Component mode (encodeURIComponent) encodes everything except letters, digits and - _ . ! ~ * ' ( ), so it's right for individual query values. Full URL mode (encodeURI) leaves URL structure characters like : / ? & = # intact.

Should spaces be %20 or +?

%20 is correct anywhere in a URL. The + sign means a space only in application/x-www-form-urlencoded data (HTML form submissions). This decoder can treat + as a space when you enable that option.

Last updated: 22 September 2026Suggest an improvement · Report a problem

Official websites, opening in a new tab. EverythingTool isn't affiliated with them.