Why "fish & chips" becomes fish%20%26%20chips
Suppose you want to link to a search for "fish & chips" in Zürich. The tempting way is to paste the words straight in: ?q=fish & chips&city=Zürich. A server reading that sees something else entirely. The & after "fish " ends the first parameter, so q is "fish ", then comes a parameter called " chips" with no value, then city. One unescaped character turned two parameters into three, and the search is for the wrong thing.
Encoding fixes this by writing every character that has a job in a URL as a percent escape. The space becomes %20 and the & becomes %26, so the first value is fish%20%26%20chips, which can only be read one way. The city needs a different kind of care. ü is not ASCII, so it is first turned into its UTF-8 bytes, C3 and BC, and each byte is written as % plus two hex digits: Z%C3%BCrich. The full query is ?q=fish%20%26%20chips&city=Z%C3%BCrich. With the base https://example.com/search the link is https://example.com/search?q=fish%20%26%20chips&city=Z%C3%BCrich. Type the same two rows above and you get exactly this.
Switch spaces to the + style and the first value becomes fish+%26+chips. That is how a browser submits an HTML form, and it decodes to the same text. The catch is the plus sign itself: if a value really contains +, such as "1+1", it must be written 1%2B1, or the server will read a space. The builder does that for you in both styles, because encodeURIComponent always escapes +.
The base URL matters too. If it already has a query, such as https://example.com/search?lang=en, the new parameters are joined with & instead of a second ?, which would otherwise become part of a value. And if it ends in a fragment like #results, the query goes before it, because everything after # stays in the browser and is never sent to the server. A query placed after the # would simply vanish from the request.
There are limits to keep in mind. This builds flat name=value pairs. Nested shapes such as filter[color]=red are just names with brackets in them, and the brackets get escaped like any other character (filter%5Bcolor%5D); PHP, Rails and most JavaScript parsers still read them correctly, but check what your server expects. It also does not check that the base URL points anywhere real, since nothing is fetched. And it will not stop you from putting secrets in a query string, which ends up in browser history and server logs. Send those in a request body or a header instead.