About URL encoding and decoding
URLs are only allowed to contain a limited set of characters. Letters, digits, and a handful of symbols are safe; spaces, accented letters, &, ?, #, and most punctuation are not. URL encoding (also called percent-encoding) replaces every unsafe character with a % followed by its hexadecimal byte value. A space becomes %20, an & becomes %26, and so on. This tool encodes and decodes in both directions, right in your browser.
Encode takes readable text and makes it URL-safe. Decode reverses it, turning %20 back into a space and %C3%A9 back into é. Decoding is UTF-8 aware, so non-Latin text and emoji survive the round trip.
When you need it
The most common case is building a URL by hand. If you drop a user’s search term straight into a query string, a space or an ampersand will break the link or cut it short. Encoding the value first keeps it intact. You will also see percent-encoding when you inspect the address bar after a search, or when you read a webhook URL, a redirect parameter, or an OAuth callback.
encodeURIComponent vs encodeURI
There are two levels of URL encoding, and mixing them up causes real bugs. This tool uses the equivalent of encodeURIComponent, which encodes a single piece of a URL, like one query value. It escapes &, =, ?, and / because those are separators that would otherwise change the URL’s structure. Use it when you are encoding a value that goes inside a URL. If you tried to encode a whole finished URL this way, you would break the :// and the slashes, so only encode the parts, not the entire address.
URL encoding is not encryption or compression. It only makes text safe to travel inside a URL, and anyone can decode it in one step.