How to use the query string builder
- Leave Mode on Build.
- In the text box, write one
key=valueper line. Only the first=splits the line, so values may contain more=signs. A line without=becomeskey=with an empty value. - Add a Base URL (optional). If it already has a
?, the new pairs are joined with&. - Pick Encode spaces as
%20or+ (form style). - Copy the full URL, or check each pair in the Encoded pairs table. To read a query instead, switch Mode to Parse and paste a URL or query string.
What it does and when to use it
Hand-written query strings break in small ways: an & inside a value starts a new parameter, a # cuts the URL short, and a + becomes a space on arrival. The builder encodes every key and value, so the server receives exactly what you typed. Use it to build a search link for a test, a redirect URL with a nested return URL, or a request to paste into a cURL to Code command.
Parse mode does the reverse for a URL copied from a browser or a log. You get a Key/Value table plus a JSON object, with repeated keys collected into an array.
How it works
Each key and value goes through JavaScript’s encodeURIComponent, which leaves letters, digits and - _ . ! ~ * ' ( ) as they are and percent-encodes everything else as UTF-8 bytes. With the + option, every %20 is then replaced with +. Pairs are joined with & and prefixed with ?. Parse mode drops everything up to the first ? and from the first #, then decodes the rest with URLSearchParams, the browser’s form-decoding rules.
Worked examples
A search link. The default lines with base https://shop.example.com/search and %20:
https://shop.example.com/search?q=running%20shoes&size=42&color=red&color=blue&sort=price%3Aasc
The colon in price:asc became %3A, and both colours are kept.
A nested return URL. Lines redirect=https://app.example.com/cb?x=1&y=2 and email=ana+test@example.com, spaces as +, no base:
?redirect=https%3A%2F%2Fapp.example.com%2Fcb%3Fx%3D1%26y%3D2&email=ana%2Btest%40example.com
Without encoding, the server would see y=2 as its own parameter and the email as “ana test”.
Parsing. …/search?q=running+shoes&color=red&color=blue&empty=#results gives rows such as q | running shoes, and the JSON turns color into an array of "red" and "blue", with "empty": "".
Limits and tips
- A
#fragmentin the base URL is kept at the end, so…/p#topbecomes…/p?a=1#top. - It does not sort, remove duplicates or check keys against an API.
- To escape text for other places, such as JSON or shell, use the String Escaper. To inspect the finished link, paste it into the URL Parser.
Frequently asked questions
Should spaces be %20 or +?
How do I send an array?
Why is a literal + in my value turned into %2B?
Are spaces at the start or end of a value kept?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.