Query String Builder

Build query strings from pairs.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

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

1
Step 1
Enter one key=value pair per line.
2
Step 2
Press Run.
3
Step 3
Append the result to your URL.

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?
List key=value pairs one per line and press Run.
Are values URL-encoded?
Yes. Characters such as & and = in a value are percent-encoded.
Why did my empty parameter disappear?
Pairs with an empty value are skipped.
Can I add the same key twice?
No. The last one wins.

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 YouTube
  • How 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.