ZapKit

Query string builder and parser

Read the parameters in a long URL at a glance, or write parameters as plain lines and get a correctly encoded query string.

What is a query string?

A query string is the part of a URL after the question mark, made of key=value pairs joined by &. Websites use it for searches, filters, pagination and tracking; APIs use it for options. Long query strings are hard to read and easy to break when typed by hand.

Paste a URL or query to list each parameter as key = value, or as JSON. Or type parameters one per line and get an encoded query string, optionally attached to a base URL. You can sort keys and drop empty values, and repeated keys are reported.

How to use the Query string builder and parser

  1. 1.Paste a URL, or type key = value lines

    The direction is detected automatically.

  2. 2.Tidy

    Sort keys or drop empty values.

  3. 3.Copy

    Parameters as lines or JSON, or the finished URL.

Example: a shop search URL

…/search?q=running%20shoes&size=9&colour=red&colour=blue&sort=

Parameters
5: q = running shoes, size = 9, colour ×2, sort (empty)
Repeated key
colour
Built back
?q=running%20shoes&size=9&page=2 from three lines

Every parameter is readable, and new ones are encoded correctly.

Encoding and repeated keys

Values are decoded when parsing, so running%20shoes reads as running shoes, and encoded when building, so spaces, &, = and non-English text can't break the URL. Spaces are written as %20, which every server understands.

A key can appear more than once, as in colour=red&colour=blue for multiple selections. Repeated keys are listed, kept in order, and become arrays in the JSON view. Fragments after # aren't sent to servers and are ignored.

Frequently asked questions

Is + a space?

In query strings it traditionally is, and it's decoded that way.

How do I add parameters to an existing URL?

Type key = value lines and put the URL in Base URL; any existing query is replaced.

What does the JSON option do with repeats?

Repeated keys become arrays, like "colour": ["red", "blue"].

Is the URL visited?

No. It's only parsed as text.

More Developer tools