Encode or decode URLs and URL components
Last updated: September 2026URL encoding, also known as percent-encoding, is the process of converting characters that are not allowed or have special meaning in a URL into a safe representation using a percent sign followed by two hexadecimal digits. For example, a space becomes %20, an ampersand becomes %26, and an equals sign becomes%3D. This is necessary because URLs can only contain a limited set of characters from the ASCII character set — letters, digits, hyphens, underscores, periods, and tildes are safe, but everything else must be encoded. Without proper encoding, browsers and servers may misinterpret characters like & or= as query-string delimiters rather than literal values. This tool supports bothencodeURIComponent, which encodes individual parameter values, and encodeURI, which encodes a full URL while preserving structural characters like colons, slashes, and question marks. Decoding reverses the process, restoring percent-encoded strings back to their original readable form.
encodeURIComponent (URI Component mode) when encoding values that will be placed inside query string parameters — this encodes characters like &, =, and / that would otherwise break the URL structure.encodeURI (Full URI mode) only when encoding a complete URL where you want to preserve the protocol, domain, path separators, and query delimiters.%20, decoding first and then re-encoding prevents sequences like %2520.%ZZ, which is not valid hexadecimal.+) is sometimes used to represent a space in form submissions but is not the same as %20. This tool uses standard percent-encoding, which converts spaces to %20.Weekly tips, new tools, and productivity hacks. No spam.