URL Encoder/Decoder

Encode or decode URL components and special characters.

Percent-encode text so it can sit safely inside a URL, or decode percent-encoded strings back to readable text. Choose Component mode (encodeURIComponent) for single values such as query parameters, or Full URL mode (encodeURI) for a whole address. It updates live as you type, which suits developers debugging links, redirects and API requests.

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters that have special meaning or are not allowed in a URL with a percent sign followed by two hexadecimal digits of each UTF-8 byte. A space becomes %20, an ampersand %26 and the letter e with an acute accent %C3%A9. Reserved characters such as ? & = # / delimit parts of a URL, so a value containing them must be encoded or the URL will be parsed differently than intended. JavaScript provides two functions: encodeURIComponent, which escapes nearly everything, and encodeURI, which leaves URL structure characters alone.

How to use URL Encoder/Decoder

  1. Enter your text Paste the text or URL into the Input box.
  2. Select a mode Pick Component (encodeURIComponent) for values or Full URL (encodeURI) for a whole address.
  3. Click Encode or Decode The result appears in the Output box and refreshes as you edit.
  4. Copy the output Use the copy button above the output.

Frequently asked questions

What is the difference between the two modes?

Component mode uses encodeURIComponent and escapes reserved characters such as / ? & = # and :. Full URL mode uses encodeURI and keeps them, because they are needed for the URL structure.

Why is a space shown as %20 and not a plus?

encodeURIComponent and encodeURI produce %20 for spaces. A plus as a space is a convention of HTML form encoding, which this tool does not apply.

Why do I get %2520 in my result?

The input was already percent-encoded, and its percent signs were encoded again. Decode once, or encode only the raw text.

Does it handle emoji and non-Latin text?

Yes. Characters are converted to UTF-8 bytes and each byte is written as a percent sequence.

Which mode should I use for query strings?

Encode each value separately in Component mode, then join them with ampersands. To split an existing query string into keys and values, use the Query Params to JSON tool.