A url encoder on this page percent-encodes one component, or decodes one component that is already percent-encoded. The buttons call encodeURIComponent and decodeURIComponent. They do not call encodeURI, and they do not try to decide which characters in a full address are syntax and which are data.
That distinction matters as soon as the text contains a question mark, an ampersand, or an equals sign. Inside a query value those characters are data, so they must be escaped or the next parser will treat them as separators. encodeURI leaves them alone because a whole URL still needs them as structure. If you run a full address through this page, the scheme colon, the slashes, and those separators will be escaped too. The result is a single component, not an address you can open.
Spaces become %20, not a plus sign. A plus sign is an application/x-www-form-urlencoded convention, and this page does not apply it. Unicode is encoded as UTF-8 bytes and then as percent sequences. Decoding reverses that. A truncated sequence such as a trailing % or a non-hex pair such as %ZZ throws, and the status says the percent-encoding is malformed. The result box is cleared so a previous success does not sit under the error.
The work stays in the browser. There is no request, no analytics call, and no copy of the text in local storage. The limit is 200,000 characters, the same cap used by the other text tools. Longer input is refused before encoding starts.
Empty input is an error. A string of spaces is real text and encodes. You do not need to trim it yourself. Keyboard focus stays on the controls that are already on the page. The result is a textarea value, so characters that look like markup are not interpreted as HTML.
Encoding a b&c?=é produces a single component in which the space, the ampersand, the question mark, the equals sign, and the accented character are all percent-encoded. Decoding that result returns the original characters. Decoding %20 returns a space. Decoding % or %ZZ stops with a malformed-sequence error.
a%20b%26c%3F%3D%C3%A9
If the next step is to see how a finished address splits into host, path, query rows, and hash, use the URL Parser Tool. Build the address first, then parse it. Do not expect this encoder to leave the separators intact.
People sometimes ask this page to “fix” a URL that already mixes raw spaces with existing percent sequences. Encoding that string will escape the percent signs themselves, so a later decode will not restore the original bytes in one step. Decode first if the text is already encoded, or encode the raw value before you join it to the rest of the address.
A component can legally contain a slash after encoding, shown as %2F. Some servers treat a decoded slash as a path separator again. This page will not guess which servers do that. It reports the encoding and stops.
Copy uses the clipboard API when the browser allows it. If the page is not allowed to write the clipboard, the status tells you to select the result and copy it yourself. Clear does not keep a second copy in a script variable. The result box is the only output.
Use this when a form, a query value, or a path segment must survive the trip into a URL. Use a parser when you already have an absolute URL and you want its parts. The two jobs are linked because they sit on opposite sides of the same encoding rules, and they are not the same button.
Uses encodeURIComponent and decodeURIComponent on one component. Those functions escape ?, &, and =. encodeURI leaves those characters in place because they are URL syntax. This is not a whole-URL encoder and it is not a slug generator. Input stays in this browser. Limit: 200,000 characters.
No. It encodes one component. A full address still needs its scheme, ?, &, and = left in place between components.
encodeURI keeps ?, &, and = because they structure a URL. encodeURIComponent escapes them so they can sit inside one component.
Decode stops and the status says the percent-encoding is malformed. The previous result is cleared.
No. A slug is a reading of a title. This page only applies percent-encoding to the text you paste.