URL Encoder and Decoder

Percent-encode text for a URL, or decode an encoded URL to text.

🔒 Client · Offline
Percent encoding for a query value or a full URL.
encodeURIComponent. Encodes ? & / # too, for one query value.

About URL encoding

A URL can hold only a small set of characters. A space, an ampersand, a question mark, and a letter with an accent each have a special meaning or are not allowed. Percent encoding writes each byte of such a character as a percent sign and two hex digits. A space becomes %20.

The URL scope toggle selects the rule. Component follows encodeURIComponent. Full URL follows encodeURI. The two rules keep a different set of characters.

Component encodes the characters that give a URL its structure: the question mark, the ampersand, the slash, and the number sign. Use Component for one value, such as a query parameter or a path segment. The value cannot break out of its place.

Full URL keeps the question mark, the ampersand, the slash, and the number sign as they are. It encodes only the characters that a URL cannot hold, such as a space or a letter with an accent. Use Full URL for a complete address that must stay usable. Component is the default, so the tool does not change the encoded characters until you select Full URL.

Paste text, then select Encode or Decode. Select Swap to send the result back to the input. If a percent escape is not valid, the tool names the character and its exact offset in the input. Every operation runs in your browser.

To see the parts of a full URL, such as the host, the path, and each query parameter, use the URL Inspector.