URL Encoding / Decoding

Encode or decode text for use in URLs

About this tool

URL encoding, also called percent encoding, replaces characters that are not allowed in a URL with a percent sign followed by their hexadecimal byte value. It turns a space into %20 and an ampersand into %26 so a value can sit safely inside a query string or path segment.

Reach for it when a parameter value contains reserved characters, when you need to read a very long tracking URL, or when an API hands back a callback that appears to be encoded twice.

When to use it

  • Building a query string whose values contain spaces, &, = or #
  • Decoding the destination inside a redirect_url or next parameter
  • Reading a long analytics or affiliate URL without opening every link
  • Escaping a value that has to travel through an HTML form or API call

Worked example

Input

Hello World!

Output

Hello%20World!

The space becomes %20. The exclamation mark is left untouched because JavaScript's encodeURIComponent treats it as safe.

Frequently asked questions

Why does a space become %20 and not a plus sign?

%20 is the URL-encoding of a space and is correct everywhere in a URL. The + shorthand only means space inside application/x-www-form-urlencoded form bodies, so mixing the two is a common source of bugs.

A URL looks double-encoded. How do I read it?

Decode once. If the result still contains %XX sequences, the value was encoded twice (common with redirect targets), so decode a second time to see the real value.

Does this tool send my text anywhere?

No. Encoding and decoding run entirely in your browser.

Related tools