Loading Query String Builder...
Please wait a moment

How to Build Query Strings - Step by Step Guide

Step 1

Enter Base URL (Optional)

Start by entering your base URL if you want to see the complete URL with query parameters:

•
API endpoints: Enter your API base URL like https://api.example.com/search
•
Website pages: Enter page URLs to build filtered or search URLs
•
Query string only: Leave blank to generate just the query string parameters

Example: Base URL Input

Enter your base API or website URL:

https://api.example.com/search
Step 2

Add Query Parameters

Add key-value pairs for your query parameters. Each parameter needs a key and value:

•
Click "Add" button: Add new parameter rows as needed
•
Enter keys and values: Fill in parameter names and their values
•
Remove unwanted: Click the trash icon to remove parameters

Example: Adding Parameters

Sample query parameters:

Key
Value
query
javascript tutorials
category
programming
page
1
Step 3

View Generated Query String

The tool automatically generates your query string with proper URL encoding:

•
Automatic encoding: Special characters are properly URL encoded
•
Preview table: See how each value is encoded before and after
•
Real-time updates: Changes appear instantly as you type

Example: Generated Query String

The output query string:

query=javascript%20tutorials&category=programming&page=1
Step 4

Copy or Download

Get your query string ready for use:

•
Copy query string: One-click copy of just the query parameters
•
Copy full URL: Copy the complete URL with base URL and parameters
•
Download: Save as text file for later use or documentation

Frequently Asked Questions

What is a query string and why do I need to build one?

A query string is the part of a URL after the ?, made of key=value pairs joined with &. RFC 3986 defines where it sits in a URL. APIs read it for search terms, filters, paging and tracking tags, and websites use it to pass state from one page to the next. Building it by hand is where typos and missing encoding creep in.

Does the tool automatically encode special characters?

Yes. Keys and values are percent-encoded as you type: a space becomes %20, & becomes %26, = becomes %3D, # becomes %23, and accented letters or emoji turn into their UTF-8 bytes (é is %C3%A9). That way a value like "a&b" stays one value instead of splitting into two parameters.

Can I add multiple parameters with the same key?

Yes. Add a row for each value and give them the same key, for example tag=red and tag=blue. Both are kept, in the order you entered them, which is how most frameworks read repeated parameters as a list. If your API expects PHP-style brackets, type the key as tags[] and the brackets get encoded for you. To pull an existing URL apart instead, try the URL Parser.

What happens if my base URL already has parameters or a #fragment?

Your parameters are added after the existing ones with an &, and if the base URL ends in ? or & no extra separator is added. A #fragment stays at the very end, after the query string, because browsers never send anything after the # to the server.

Is the generated query string ready for use in APIs?

It should be. The output uses standard percent-encoding, which any server or HTTP library decodes the same way, so you can paste it into fetch calls, curl commands or an API client. What it can't check is whether the parameter names match what your API expects, so compare them with the API docs.

Can I see how values are encoded?

Yes. The Parameters Preview table lists every key and value as you typed it next to the encoded value, exactly as it appears in the query string. It is a quick way to spot a stray space or a character you didn't expect.

Is the query string builder free?

Yes, there is no sign-up and no limit on how many query strings you build. The query string is built right in your browser, so nothing has to be sent to a server to make it.