Developer Tools

URL Encoder

Percent-encode text so it is safe to drop into a URL query string or parameter. Spaces, ampersands, slashes, and other reserved characters become their %xx equivalents instantly. This encoder uses encodeURIComponent and runs entirely in your browser.

How do you URL encode a string?

To URL encode text, paste it and the percent-encoded version appears instantly. Spaces become %20, ampersands %26, slashes %2F, and question marks %3F, so 'hello world&lang=en' becomes hello%20world%26lang%3Den. Encoding follows the JavaScript encodeURIComponent standard, which leaves letters, digits, and - _ . ! ~ * ' ( ) unchanged, and runs entirely in the browser.

What is the difference between %20 and + for spaces?

Both represent a space, but in different contexts. %20 is the standard percent-encoding valid anywhere in a URL. The plus sign is only a space inside application/x-www-form-urlencoded data, such as HTML form submissions and query strings built by browsers. encodeURIComponent always outputs %20, which is safe in both places.

Runs in your browser. Your files and text never leave your device - nothing is uploaded.