Development
What is URL Encoding?
Percent-encoding of special characters in URLs to ensure safe transmission.
URL encoding (percent-encoding) converts characters that are not allowed or have special meaning in URLs into a safe representation. Each character is replaced by a % sign followed by two hexadecimal digits representing its ASCII value.
For example, a space becomes %20, & becomes %26, and = becomes %3D. URLs must be encoded before being used in HTTP requests to prevent misinterpretation of special characters.
Reserved vs Unreserved Characters
Unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) never need encoding. Reserved characters (/, ?, #, &, =, +) have special meaning in URLs and must be encoded when used as data.
FAQ
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL and preserves reserved characters like /, ?, &. encodeURIComponent encodes a URL component and encodes all special characters including reserved ones.
Related Tools
Related Terms