Percent-encode a value or decode one back, choosing between a single query value and a whole URL, with the parts listed out when the input is a URL.
The result appears hereOne value escapes everything, including the slashes and the ampersands, which is what a query value needs. Whole URL leaves the structural characters alone so the address still works.
Because form encoding uses + for a space while percent encoding uses %20. If a value came from a form body, replace + with a space before decoding it.
When the input parses as a URL, it is broken into protocol, host, path, each query parameter and the fragment, already decoded. It is the fastest way to see which parameter is malformed.
It was encoded twice: %20 became %2520 when the already-encoded string was passed through an encoder again. Encode once, at the point where the value is put into the URL, and never on a string that is already a URL.