🦁 IP Animals
πŸ”’ Converters & Encoders

URL Encoder & Decoder

Percent-encode text so it is safe to drop into a URL, or decode an encoded link back to readable text. Choose component mode for a single value or full-URL mode for a whole address β€” all in your browser.

What is URL encoding?

URL encoding β€” also called percent-encoding β€” is how the web squeezes any character into the limited set that a web address is allowed to contain. URLs may only use a small alphabet of unreserved characters and a handful of reserved ones that carry structural meaning (/ separates paths, ? starts the query, & joins parameters, and so on). Anything else β€” spaces, accents, emoji, or a literal & inside a value β€” has to be escaped as a % followed by the two-digit hexadecimal value of each byte.

That is why a space becomes %20 and cafΓ© becomes caf%C3%A9 (two bytes, because Γ© is two bytes in UTF-8). Encode a b&c=cafΓ© in component mode and you get a%20b%26c%3Dcaf%C3%A9 β€” safe to paste into a query string without breaking it.

πŸ”— Component vs full URL β€” pick the right mode

Use component mode (encodeURIComponent) when you are encoding one piece β€” a single search term or parameter value β€” because it escapes the structural characters too. Use full-URL mode (encodeURI) when you have an entire address, so that : / ? & and # stay intact and the link still works.

Where you will meet percent-encoding

  • Query strings: search boxes encode your terms before appending them to ?q=.
  • Form submissions: data sent to a server is percent-encoded so special characters survive.
  • APIs: path and query parameters must be encoded to avoid ambiguity.
  • Sharing links: a URL containing another URL needs the inner one encoded.

Every request you make travels through the same plumbing whether the data is encoded or not. If you are curious how a browser turns a URL into a page, see how data travels the internet and HTTP vs HTTPS.

Need a different transformation? The Base64 Encoder & Decoder handles binary-to-text, and the Hex to Text converter shows the raw bytes behind your characters. Like every IP Animals tool, this runs 100% locally β€” nothing you type is ever uploaded, logged or stored.

Frequently asked questions

What is the difference between component and full-URL mode?

Component mode uses encodeURIComponent, which escapes reserved characters like /, ?, &, = and # β€” perfect for a single query value or path segment. Full-URL mode uses encodeURI, which leaves those structural characters intact so an entire address stays usable.

Why is a space encoded as %20?

Spaces are not allowed in URLs, so they are percent-encoded as %20, the hexadecimal byte value of a space. In older form data you may see a space written as a plus sign, but %20 is the correct general-purpose encoding and what this tool produces.

Why did decoding show an error?

Decoding fails on a malformed percent-escape β€” for example a lone % sign or % followed by characters that are not two valid hex digits, such as %ZZ. Make sure every % is followed by exactly two hex digits that represent real UTF-8 bytes.

Is my text uploaded anywhere?

No. Encoding and decoding happen entirely in your browser using the built-in JavaScript functions. Your text is never sent to a server, logged or stored, so the tool works offline and is safe for private URLs and query strings.

Want the theory? Read the guides β†’ Β· Visit the zoo β†’