Skip to main content

Query String Builder

Enter key=value pairs (one per line) and get a properly URL-encoded query string ready to append to a URL.

Reviewed for accuracy by the Math Ora X team Last updated

About this tool

Enter key=value pairs (one per line) and get a properly URL-encoded query string ready to append to a URL.

Example

Input: name=Al B\nage=30

Output: ?name=Al+B&age=30

Privacy

This tool runs entirely in your browser. Your data is processed locally and never uploaded to a server.

How to use this tool

  1. Paste or type one key=value pair per line.
  2. Use plain text keys and values, and keep one pair on each line.
  3. Click or wait for the tool to build the encoded query string.
  4. Copy the result and append it to a URL after the question mark.

Step by step, what happens

  1. The tool reads each line as a separate key and value pair.
  2. It splits the line at the first equals sign so the left side becomes the key and the right side becomes the value.
  3. It URL-encodes reserved characters in the key and value so spaces, ampersands, and other special characters are safe in a query string.
  4. It joins the encoded pairs with ampersands to produce a ready-to-use query string.

Worked example

Here is a simple example where you want to search for a term and include a page number in the URL.

Input: q=red shoes page=2

  1. The tool treats q as the first key and red shoes as its value, then encodes the space.
  2. It treats page as the second key with the value 2, which needs no special encoding.

Output: q=red%20shoes&page=2

Tips and common mistakes

  • Put only one key=value pair on each line, or the tool may treat extra text as part of the value.
  • If your value contains an equals sign, check that the tool uses the first equals sign to split the pair.
  • Special characters like spaces, ampersands, and question marks should be left unescaped in the input because the tool will encode them for you.
  • If you already have a full query string, remove the leading question mark before pasting it here.

Frequently asked questions

What input format?

One key=value per line. The part before the first = is the key.

Are special characters encoded?

Yes, spaces and symbols are percent-encoded so the string is URL-safe.

Does it add the leading ?

Yes, the output starts with ? ready to append to a URL.

More Developer Tools Tools

Explore related calculators in this category

You Might Also Like

Popular tools from other categories

Can't Find the Right Calculator?

Try our AI Math Solver, type any problem in plain English and get instant step-by-step solutions.

Try AI Solver

Browse All Categories

Home Developer Tools Current Tool
Facebook Twitter WhatsApp