Turn key and value lines or a JSON object into a correctly escaped query string, with repeated keys for array values and optional RFC 3986 strict escaping.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
Assembling a query string correctly
Building a query by hand is where encoding bugs are introduced. This takes key and value pairs and produces a correctly encoded string, escaping the characters that would otherwise be read as structure.
Worked example
q = café shop tags = a&b tags = c → ?q=caf%C3%A9%20shop&tags=a%26b&tags=c
Repeated keys are legitimate
Multi-select filters, tag lists and array parameters all send the same key more than once, and frameworks differ in how they read them — some take the last, some build a list, some expect tags[] instead. The builder keeps repeats rather than collapsing them, because collapsing silently drops user selections.
Order and caching
Parameter order does not change meaning to most servers but does change the URL string, and therefore the cache key. Two URLs identical except for parameter order are two entries in a CDN, which is worth knowing when a cache hit rate looks worse than it should.
Limits
The tool builds and encodes; it does not know which convention your framework expects for arrays. Everything runs in your browser.
How to use the Query String Builder
- Enter your parameters as "key = value" lines, one per line, or switch the input format to JSON.
- Repeat a key on several lines – or use a JSON array – to produce repeated parameters.
- Choose whether spaces become plus signs and whether to apply strict RFC 3986 escaping.
- Click "Build query string" and append the result to your URL.
Frequently asked questions
How do I create an array parameter?
Repeat the key. Writing "tag = a" and "tag = b" on separate lines produces "tag=a&tag=b", which is the form most APIs expect. In JSON mode, give the key an array value and the same output is produced.
Are my keys and values escaped for me?
Yes, both. Every key and every value is percent-encoded independently, so an ampersand or equals sign inside a value cannot break the structure of the query string.
Should I include the leading question mark?
Include it when you are appending the result to a URL that has no query string yet. Leave it off when you are joining onto an existing query with an ampersand. The option controls this.
Build a URL with parameters
A query string whose values are encoded correctly, including the awkward characters.
- URI Component EncoderEncode each value on its own, so separators inside values survive.
- Query String Builder you are hereAssemble the encoded values into a query string.