Query String Builder

Build or edit URL query strings with correct encoding and arrays.

About this tool

Paste an existing URL to load its parameters, or start from a base URL. Add, edit, remove or untick parameters, choose how spaces and repeated keys are encoded, and sort keys if you want. The full URL updates as you type, ready to copy.

How query strings are encoded

A query string is the part of a URL after ?, made of key=value pairs joined by &. Characters with special meaning have to be percent-encoded: & becomes %26, = becomes %3D, a space becomes %20, and non-ASCII text becomes its UTF-8 bytes, such as รฉ as %C3%A9. HTML forms traditionally send spaces as + instead, which most servers accept in query strings. This builder also escapes ! ' ( ) and *, which JavaScript's encodeURIComponent leaves alone, so links survive email clients and strict parsers. When a key repeats, servers differ. Most read tag=a&tag=b as a list, PHP and Rails expect tag[]=a&tag[]=b, and some APIs want tag=a,b. Sorting keys gives consistent URLs, which helps caching and signatures. A #fragment always stays at the end, because it is never sent to the server. Honest limits: check how your framework reads repeated keys and + signs. Never put passwords or tokens in query strings, because they end up in server logs, browser history and analytics. The URL parser, the URL encoder and the UTM builder are related.

Frequently asked questions

How do I add parameters to a URL?

Add key/value rows here and copy the generated URL. Values are encoded for you.

Should spaces be %20 or +?

%20 is always correct. + also means a space in query strings sent by HTML forms.

How do I pass an array in a query string?

Usually by repeating the key (tag=a&tag=b). PHP uses tag[]=a&tag[]=b, and some APIs use commas.

Is anything uploaded?

No. Everything runs in your browser and nothing is stored or sent.