Query String Builder
Build clean URL query strings from key-value pairs. Choose how arrays serialize, control encoding, sort keys, and copy a ready-to-use query string or full URL.
Parameters
4 activeRepeated keys form arrays. Use the array style below to control how they serialize.
Options
Import from existing URL or query string
Generated Output
Updated live as you edit.
?q=svelte%20kit&page=1&tags=frontend&tags=sveltehttps://api.example.com/search?q=svelte%20kit&page=1&tags=frontend&tags=svelteAbout Query String Builder
A query string is the part of a URL after the ? that carries
key-value pairs to the server — things like search terms, filters, pagination, tracking IDs, and feature flags.
Each pair is joined with = and separated by &, and special characters need to be percent-encoded
so they survive the trip through URLs and HTTP.
This builder generates a clean query string from a list of parameters, handles encoding for keys and values, supports four common array styles (repeat, brackets, indices, comma), and can either output the bare query string or compose it with a base URL. Everything runs locally in your browser — nothing is uploaded.
How to Use Query String Builder
- (Optional) Enter a Base URL if you want the full URL rather than just the query string.
- Add parameters as key/value pairs. Use the checkbox to temporarily disable a row without deleting it.
- To send a parameter multiple times (an array), add the same key on multiple rows.
- Pick an Array Style that matches your backend —
repeatfor Node/Express,bracketsfor PHP / Rails,indicesfor some PHP setups, orcommafor CSV-style joining. - Choose the space character —
%20for general URLs or+for form-encoded data. - Toggle Encode keys / values, Sort by key, and Skip empty to match your spec.
- Paste an existing URL or query string into the Import box to populate fields from it.
- Click Copy next to the Query String or Full URL to use it anywhere.
Common Use Cases
API requests
Build search, filter, and pagination params for REST endpoints with correct encoding and array handling.
Tracking & analytics
Compose UTM links and campaign URLs with consistent encoding instead of hand-editing strings.
Debugging integrations
Paste a URL from a log or browser, split it into editable fields, tweak values, and re-export.
Documentation examples
Produce copy-ready query strings for READMEs, API docs, and shared examples.
Form-encoded payloads
Generate application/x-www-form-urlencoded bodies by toggling the + space option.
Affiliate & deep links
Add many small parameters to product URLs without breaking encoding for special characters.
FAQ
What characters need to be encoded in a query string?
Anything outside the unreserved set A–Z a–z 0–9 - _ . ~ should be
percent-encoded. That includes spaces, &, =, ?, #, +,
and non-ASCII characters. This tool uses encodeURIComponent under the hood.
Should I encode spaces as %20 or +?
For URL query strings, %20 is the safe default and always works. The + form comes from HTML form encoding (application/x-www-form-urlencoded)
— use it only when the receiver expects form-encoded data.
Which array style should I pick?
It depends on the framework. Repeat (tags=a&tags=b) works
with Node/Express, Go, .NET, and Spring. Brackets (tags[]=a&tags[]=b)
is common in PHP and Rails. Indices preserves order for hash-style parameters. Comma joins values into one parameter and is used by OpenAPI's style: form, explode: false.
Can I edit an existing URL with this tool?
Yes. Paste a full URL or just a query string into the Import box and click Parse & Replace. The base URL and all parameters will load into the editor, where you can change them and copy the result.
Is there a limit on query string length?
The HTTP spec has no fixed limit, but most servers and browsers cap URLs at around 2,000–8,000 characters. For larger payloads, send the data in a POST request body instead of the URL.
Does the tool send my data anywhere?
No. All parsing, encoding, and string building happens locally in your browser. There is no signup, no telemetry, and no upload.