Parse & rebuild
Parsing strips the URL down to the query portion, decodes each key and value (including + as space) and lists one parameter per line. Rebuild re-encodes a key = value list back into a valid query string.
Frequently asked questions
Duplicate keys?
Each occurrence is listed separately — arrays like a=1&a=2 are preserved.
Empty values?
a= and bare a both decode to an empty value.
Fragments?
Anything after # is ignored, matching URL semantics.