1. Home
  2. Developer
  3. Query String Builder

Query String Builder

Edit URL parameters in a table, add UTM tags, and strip tracking codes in one click.

Runs in your browser · No upload
Paste a full URL, a relative path (/search?q=1) or just the query (a=1&b=2).
7 parameter(s)
Final URL
https://shop.example.com/search?q=wireless%20earbuds&sort=price_asc&page=2&utm_source=newsletter&utm_medium=email&tag=new&tag=sale
JSON view
{ "q": "wireless earbuds", "sort": "price_asc", "page": "2", "utm_source": "newsletter", "utm_medium": "email", "tag": [ "new", "sale" ] }

How to use

  1. Paste a URL into the top box. It is split into protocol, host, port, path, hash and a parameter table. A full address works, and so does a relative path such as /search?q=1 or just a query such as a=1&b=2.
  2. Edit keys and values in the table, delete rows, or reorder them with the up and down buttons. Values are shown as readable text (wireless earbuds), not %20 codes, and every edit rebuilds the URL above and the Final URL below.
  3. Choose whether spaces are written as %20 or +.
  4. Use the buttons for Add UTM, Remove tracking params, Sort keys and Remove empty values.
  5. JSON view shows the same parameters as an object. A key that appears more than once becomes an array.

URL structure

https://shop.example.com:8443/search?q=a&page=2#reviews breaks down like this.

Part Value Notes
Protocol https Before ://
Host shop.example.com Includes user:pw@ when login info is present
Port 8443 Omitted means the protocol default
Path /search
Query q=a&page=2 After ?, a list of key=value joined by &
Hash reviews After #. Used only in the browser and never sent to the server

Encoding rules

This tool encodes by hand instead of using the browser’s URL and URLSearchParams. URLSearchParams follows the old form style: it always writes a space as + and leaves characters such as * alone.

  • Each character becomes UTF-8 bytes, and every byte is written as %XX. A Korean syllable such as 이 is 3 bytes, so it becomes %EC%9D%B4.
  • The characters ! ' ( ) *, which encodeURIComponent leaves alone, are encoded too (strict RFC 3986). it's (ok)* becomes it%27s%20%28ok%29%2A, while plain encodeURIComponent gives it's%20(ok)*.
  • & = + # ? would break the structure inside a value, so they are always encoded. For example the value a&b=c d+e becomes a%26b%3Dc%20d%2Be (a%26b%3Dc+d%2Be with the + space option). A literal + is written %2B either way, so it never gets confused with a space.
  • When reading, + is taken as a space and %2B as a plus sign.
Space option Result Used by
%20 q=a%20b Most APIs and links (default)
+ q=a+b HTML form style (application/x-www-form-urlencoded)

In the path and hash, only characters that are not allowed (spaces, non-ASCII text) are converted to %XX; existing %XX sequences and characters such as / : @ are kept.

Malformed % encoding

A piece such as %ZZ, where % is not followed by two hex digits, or %E0%A4%A, which is not valid UTF-8, cannot be decoded. Such a parameter is kept exactly as typed and a warning is shown. As soon as you edit that row’s key or value it is encoded afresh (for example the value %ZZ becomes %25ZZ).

UTM parameters

Key Meaning Example
utm_source Where the visit came from google, newsletter
utm_medium Channel cpc, email
utm_campaign Campaign name autumn_sale
utm_term Paid search keyword wireless earbuds
utm_content Which ad variant banner_a

Add UTM appends the five keys with empty values and skips any that already exist. Fill the values in yourself. Analytics tools count Email and email as different values, so keep them lowercase.

Removing tracking parameters

Removing tracking parameters before you share a link shortens the address and keeps details such as which ad someone came through from travelling with it. These are removed (case-insensitive).

Kind Keys
UTM Every key starting with utm_
Naver ads Keys starting with n_ (n_media, n_query and so on)
Google gclid, gbraid, wbraid, dclid, _ga
Meta and Instagram fbclid, igshid
Microsoft and Yahoo msclkid, yclid
TikTok and X ttclid, twclid
Mailchimp mc_eid, mc_cid

Ordinary parameters such as page, q and sort stay. Every key starting with n_ is removed, though, so if a site has its own key like n_items, check the result after removal.

For example, removing tracking from ...search?q=wireless earbuds&sort=price_asc&page=2&utm_source=naver&utm_medium=cpc&tag=a&tag=b drops utm_source and utm_medium and leaves ...search?q=wireless%20earbuds&sort=price_asc&page=2&tag=a&tag=b.

Repeated keys

When a key is used more than once, as in tag=a&tag=b, it stays as separate rows in the table in the same order. How a server reads that depends on the framework.

Style Example Notes
Repeated key tag=a&tag=b Most frameworks read an array; some keep only the last value
Brackets tag[]=a&tag[]=b PHP and Rails style. This tool treats the key as the text tag[]
Comma tag=a,b One string; the server has to split it

In the JSON view a repeated key becomes an array ("tag":["a","b"]) and a single one stays a string.

To encode or decode just one value, use the URL Encoder. To tidy a JSON response, use the JSON Formatter. For share-preview tags, try the Meta Tag Generator.

The text you enter is processed in your browser only and is never sent to a server.

Can't find the tool you need?

Tell us what you want to do. We build the most requested tools first.