This tool percent-encodes text so it can sit safely inside a URL, and decodes it back. It updates as you type, and both JavaScript modes are available: encodeURIComponent for a single value, and encodeURI for a whole address.
Decoding checks the input before it converts it. If a percent sign is not followed by two hex digits, or a run of bytes is not valid UTF-8, you get the exact sequence and its position instead of a silent failure.
Swap moves the result into the input and flips the direction, so you can check a round trip. Everything runs in your browser and nothing is sent anywhere.
Component mode (encodeURIComponent) escapes everything except letters, digits and - _ . ! ~ * ' ( ). Use it for a single value, such as a query parameter or a path segment. Full URL mode (encodeURI) also leaves : / ? # [ ] @ & = + $ , ; alone, so a whole address keeps its structure.
A percent sign must be followed by two hex digits, like %20, and a run of them must form valid UTF-8, like %C3%A9. The error names the exact sequence and its position. A stray % in plain text should be written as %25.
Percent-encoding writes a space as %20, and that works everywhere in a URL. The + form is only a convention for HTML form data in the query string. If you are decoding form data, turn on Treat + as a space.
Anything outside the safe set is converted to UTF-8 bytes and each byte is written as %XX. That is why an accented letter becomes two sequences and an emoji becomes four.
No. Encoding and decoding run in your browser with built-in functions, and nothing is uploaded or stored.