Percent-encode a string for safe use in a URL, decode one you have been handed, or split a full URL into protocol, host, path, query parameters and fragment.
Encode and decode with correct percent-encoding rules
Parse a URL into its components and query parameters
Useful for debugging redirects, callbacks and tracking links
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves characters that have meaning in a URL (like / and ?) alone, while encodeURIComponent encodes them too. Use the component version for individual query values.
Why does my query parameter break?
Usually an unencoded ampersand or equals sign inside a value. Encoding the value fixes it.