Skip to content

Query String Builder

Write your parameters as plain lines or JSON and get a safely encoded query string.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is Query String Builder?

A query string must escape reserved characters such as spaces, "&", "=", "#" and non-ASCII letters, otherwise the server reads the wrong value. Two conventions exist: RFC 3986 writes a space as %20, while the HTML form format writes it as "+".

Type one key=value pair per line, or paste a JSON object (nested objects and arrays are supported). The tool encodes every name and value, lets you pick how arrays are written (a=1&a=2, a[]=1, a[0]=1 or a=1,2) and can sort the keys for stable, cache-friendly URLs.

How does it work?

  1. Enter one key=value pair per line, or paste a JSON object such as {"q":"café","tags":["a","b"]}.
  2. Choose the encoding style: RFC 3986 (%20) or form (+).
  3. Pick the array format your backend expects, and tick sort keys or the leading "?" if you need them.
  4. Copy the encoded query string and append it to your URL.

Common use cases

  • Preparing test requests for an API from a list of parameters.
  • Encoding accented or emoji values so a link works in every client.
  • Producing a canonical, sorted query string for a cache key or a signature base string.
  • Converting a JSON filter object into the URL parameters a search endpoint expects.

Examples

Try this input in the tool above:

Input
q=café & thé
lang=fr
tags=a
tags=b
page=2
Output
q=caf%C3%A9%20%26%20th%C3%A9&lang=fr&tags=a&tags=b&page=2

Privacy

Query String Builder runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Array and nesting syntax is a convention, not a standard: check which format your server or framework actually parses.

Frequently asked questions

Should I use %20 or + for spaces?

Both decode to a space in a query string, but %20 is valid everywhere, including in URL paths. "+" is only a space in form-style query strings, so RFC 3986 is the safer default.

How do I send an array?

It depends on the server. Repeating the name (a=1&a=2) is the most portable; a[]=1 suits PHP and Rails; a=1,2 suits APIs that split on commas.

Is my input treated as JSON automatically?

If the trimmed input starts with "{", it is parsed as a JSON object and an error is shown when it is invalid. Otherwise each line is read as key=value.

More tools in Developer Tools →