Query String Builder
Add key/value pairs and a base URL, and instantly build a correctly URL-encoded query string and full URL — with proper percent-encoding, empty-key skipping, and copy, all in your browser.
ToolsSoup's Query String Builder is a free online tool that turns a list of key/value pairs into a correctly URL-encoded query string — and a full URL when you add a base. Type each parameter name and value into its own row, add or remove rows as you go, and the encoded query string updates live. Keys and values are percent-encoded with the same URLSearchParams logic browsers use, so spaces, ampersands, and other special characters are escaped safely. Everything runs locally in your browser, so nothing you type is ever uploaded to a server. It is the exact inverse of our Query String Parser.
What is a query string builder?
A query string is the part of a URL after the question mark, made up of name=value pairs joined by ampersands — for example ?page=2&sort=price&tag=new. Building one by hand is error-prone because every special character in a key or value has to be percent-encoded: a space becomes %20, an ampersand becomes %26, and so on. A query string builder takes plain key/value pairs and does that encoding for you, producing a string that is safe to drop straight into a URL. This tool uses the browser's native URLSearchParams, so the output matches exactly what the platform itself would generate.
How to build a query string
Assembling a query string takes just a few seconds:
- Type a parameter name and value into the first row, then click Add parameter for each extra pair.
- Optionally paste a base URL to get a full, ready-to-use link instead of just the query string.
- Copy the encoded result — rows with an empty key are skipped automatically.
Encoding, empty keys, and the base URL
Every key and value is percent-encoded individually, so you can type characters like spaces, =, &, or # without breaking the URL. Rows that have no key are skipped, which lets you keep blank rows around while you work without polluting the output. When you provide a base URL, the builder appends the query with a ? if the base has none yet, or with an & if it already contains a query string. Without a base, you can toggle a leading question mark on or off depending on whether you want a standalone ?a=1&b=2 or a bare a=1&b=2.
Why use this query string builder?
- Percent-encodes every key and value with the browser's native URLSearchParams for correct, safe output.
- Add and remove parameter rows freely, with a clean key/value input for each pair.
- Optionally combine your parameters with a base URL to get a complete, ready-to-use link.
- Skips rows with empty keys and lets you add or omit the leading question mark.
- Runs 100% in your browser, so values with tokens or personal data never leave your device.
Frequently asked questions
How are special characters handled?
Each key and value is percent-encoded separately using URLSearchParams, the same encoder browsers use. Spaces become %20 (or + in some contexts), ampersands become %26, and other reserved characters are escaped, so the query string is always safe to place in a URL.
Can I repeat the same key?
Yes. Add two rows with the same name — for example tag and tag — and both appear in the output as tag=a&tag=b. Repeating a key is the standard way to encode arrays and multi-select filters in a query string.
What happens to empty rows?
Rows with an empty key are skipped, so you can leave a blank row in place while you build the rest. A row with a filled key but an empty value is kept and produces key= in the output.
Is anything I type uploaded anywhere?
No. All encoding happens locally in your browser with JavaScript. The keys, values, and base URL you type and the result never leave your device, so it is safe to build URLs that contain tokens or other private data.