URL Encoder / Decoder

URL encode/decode and component encoding

URL encode/decode and component encoding
?
Input
Output

Tool guide

About URL Encoder / Decoder

A URL encoder and decoder turns unsafe or reserved URL characters into percent-encoded text, then decodes encoded strings back into readable text.

Use it for query parameters, non-English paths, callback URLs, and URL fragments copied from logs. Encoding and decoding run locally in your browser.

How to use the URL Encoder/Decoder

  1. Paste a full URL, a query parameter value, or the text you need to encode.
  2. Click Encode to turn spaces, non-English text, and symbols into safe percent encoding.
  3. Click Decode to turn strings like %E4%B8%AD%E6%96%87 back into readable text.
  4. When only one parameter needs encoding, encode the value rather than the whole query string so & and = keep their structure.

When you would use it

  • Encode search terms, callback URLs, or redirect parameters before placing them in a URL so &, ?, and # do not break the parameter.
  • Decode percent-encoded paths or query strings from API logs into readable text.
  • Debug double-encoding issues in OAuth redirect_uri values, webhook callbacks, or shared links.
  • Compare frontend encodeURIComponent output with what the backend actually receives.

Percent encoding, query parameters, and common traps

Some URL characters have structural meaning, such as ?, &, =, #, and /. Percent encoding writes bytes as %HH so those characters can travel as data instead of being parsed as URL structure.

  • Spaces: usually encoded as %20; form encoding may also use +.
  • Non-English text and emoji: encoded as UTF-8 bytes first, then written as percent sequences.
  • encodeURI vs encodeURIComponent: encodeURI keeps URL structure characters; encodeURIComponent is better for a single parameter value.
  • Double encoding: %25E4 often means an existing percent sign was encoded again.

URL Encoder/Decoder FAQ

Should I encode a whole URL or one parameter?
Usually encode one parameter value. Encoding a whole URL also escapes : / ? & and other structure characters, which can make the link parse incorrectly.
Why is a space sometimes %20 and sometimes +?
%20 is general percent encoding. The plus sign is common in application/x-www-form-urlencoded form encoding.
Why do percent signs remain after decoding?
The text may be double-encoded, or the original value may contain a literal percent sign. Decode again only when you know it is double-encoded.
Does URL-safe Base64 still need URL encoding?
It often needs less escaping because it avoids + and /. Still check for = padding or other special characters before putting it in a query string.
Is my input uploaded?
No. Encoding and decoding run locally in the browser and the input is not uploaded to wetool.site.

URL encoding vs Base64

URL encoding makes characters safe inside URLs. Base64 represents bytes as text. Tokens, images, and binary payloads may involve both, but they solve different problems.

encodeURI vs encodeURIComponent

Most URL encoding bugs come from treating a full URL and a single parameter value as the same thing.

  • Full URL: encodeURI semantics keep : / ? & = # as structure characters, which fits an already assembled link.
  • Parameter value: encodeURIComponent semantics encode &, =, ?, and #, which fits search, redirect_uri, callback, and similar values.
  • Form rules: application/x-www-form-urlencoded often writes spaces as +, while general percent encoding usually uses %20.

URL encoding debugging checklist

When a backend receives the wrong URL parameter, check how many times the browser, frontend code, gateway, and backend framework encode or decode it.

  • %25 often means an existing percent sign was encoded again, so double encoding is likely.
  • If redirect_uri contains its own query string, the inner ?, &, and = must be encoded as data.
  • Do not put decoded user input directly into HTML or redirect URLs; keep protocol allowlists and output escaping.