What is URL encoding (percent-encoding)?
URL encoding replaces unsafe characters with %XX escapes so they survive inside a URL. Learn how percent-encoding works and encode/decode free.
URL encoding, or percent-encoding, replaces characters that are unsafe or reserved in a URL with a % followed by their two-digit hex byte value. It is what turns a space into %20 and an ampersand into %26 inside a query string.
Why it is needed
URLs have a limited safe alphabet. Characters like spaces, &, ?, #, and = have special meaning or are not allowed, so putting them in a value would break the URL. Percent-encoding escapes them into a %XX form that carries the raw byte without confusing the parser.
How a character becomes %XX
Each unsafe character is converted to its UTF-8 bytes, and each byte is written as a percent sign plus two hex digits. A space (byte 0x20) becomes %20; é (two UTF-8 bytes) becomes %C3%A9. Reserved characters are only encoded when used as data rather than as delimiters.
encodeURIComponent vs encodeURI
In JavaScript, encodeURIComponent escapes everything unsafe in a single query value, while encodeURI leaves the structural characters of a full URL intact. Use encodeURIComponent for individual query-string values.
Try it now — free, no signup
Use the URL encoder in your browser. Then, when you need it at scale with an API key and higher limits, grab the full Eveses API.