Encode and decode Base64, URLs and HTML entities. Handles emoji.
URL encoding, also called percent encoding, is what makes a space become %20 and an accented letter become a short run of %XX codes. You need it when you build a link by hand, put a search term or a redirect address inside a query string, or read a link that someone copied from a browser and is full of percent signs. This page opens on the URL tab. The first choice is the one that matters: Whole value uses encodeURIComponent and escapes / ? & = and # as well, which is right for one piece of a link, such as the text after q=. Whole address uses encodeURI and keeps those characters, which is right for a complete link that has a space or an accent in it. Decoding follows the same choice. A plus sign is left as a plus, because it only means a space in form data. A % without two hex digits after it is reported in words. The tool does not split a query string into parts.
Encode the inner link with Whole value, so that its ? & and = do not end up as part of the outer link. https://a.com/x?y=1 becomes https%3A%2F%2Fa.com%2Fx%3Fy%3D1. The server then decodes it back.
Only form data uses + for a space. In the path or a plain query value + is a real plus. Whole value mode encodes a plus as %2B, so 1+1 becomes 1%2B1. Whole address mode and both decode modes leave a literal + as it is, and a space is always %20.
An emoji is stored as two halves in the browser's text. If one half is cut off, for example when text was trimmed in the middle of an emoji, it cannot be encoded as UTF-8. Remove the broken character and the encoding works.