Encode or decode URL strings. Encoding converts special characters to percent-encoding; decoding converts them back.
URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits. For example, space becomes %20. Use encodeURIComponent for query string parameters.