Query String Builder
Build query strings from pairs.
About this tool
Type one key=value pair per line and get a ready-to-append query string. Values are percent-encoded, spaces become plus signs, and pairs with an empty value are dropped.
How to use
How it works
Each line is split at the first equals sign. The pairs are written with URLSearchParams, so spaces turn into + and characters like & and = in a value are percent-encoded. Pairs whose value is empty are skipped. If you repeat a key, the later line overwrites the earlier one.
Worked example
Spaces, an empty value and an ampersand
- Input
- q=hello world page=2 empty= x=a&b
- Output
- ?q=hello+world&page=2&x=a%26b
- Walkthrough
- empty was dropped, the space became + and the & inside x was encoded as %26 so it does not start a new parameter.
Limitations
- Repeated keys overwrite each other, so you cannot send tag=a&tag=b.
- Empty values are removed, so you cannot send flag=.
- Spaces are written as +, not %20.
Questions
How do I build a query string?
Are values URL-encoded?
Why did my empty parameter disappear?
Can I add the same key twice?
Features
- Auto-encoding
- Skips empty values
- Leading ? included
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
Learn JSON - Full Crash Course
freeCodeCamp.org
JSON is the payload format behind many developer tools here.
Watch on YouTubeHow base64 encoding works
Andrew Schmelyun
Mental model for Base64 encode/decode tools.
Watch on YouTube
- Introducing JSON
json.org
Canonical JSON grammar for formatters and validators.
- web.dev
Google
Modern web guidance that pairs with encoding and tooling pages.