Output
About URL Encoding
URL encoding (also known as percent-encoding) converts characters into a format that can be transmitted over the Internet. Special characters like spaces, ampersands, and non-ASCII characters are replaced with percent signs followed by two hexadecimal digits.
encodeURI vs encodeURIComponent
encodeURI encodes a full URL but preserves characters like :, /,
?, &, = that are part of the URL structure.
encodeURIComponent encodes everything, making it safe for use as a query parameter value.