consolelog.tools

Query String Builder

Build URL query strings with live preview, validation, and 4 array-format styles.

About this ToolHow it works, benefits & use cases

Assemble a fully encoded URL from a base address and a list of key/value parameters, with the query string updating as you type. Each parameter row has an enable checkbox so you can toggle params in and out without deleting them, and repeated keys are grouped and serialized using one of four array styles: bracket (key[]=value), index (key[0]=value), comma (key=val1,val2), or repeat (key=val1&key=val2). Keys and values are percent-encoded with encodeURIComponent, and a live stats strip reports the enabled/total parameter counts and the encoded length. Inline validation flags empty keys and keys containing "=" as errors, and warns about keys with spaces or values over 2048 characters. A "Parse from URL" button reverses the process: paste a URL with a query string and it splits the parameters back into editable rows, stripping array suffixes like [] and [0] as it goes.

How to Use

  1. 1Enter your endpoint in the Base URL field, or click "Load example" to start from a sample search URL.
  2. 2Add parameter rows with the "Add" button, then fill in each Key and Value; uncheck a row to exclude it from the output without removing it.
  3. 3Choose an Array format (bracket, index, comma, or repeat) to control how repeated keys are serialized.
  4. 4Already have a URL with a query string? Paste it into Base URL and click "Parse from URL" to split it into editable rows.
  5. 5Watch the generated URL build live, review the validation banner and stats, then copy or share the result.

Key Benefits

  • Live, fully percent-encoded URL preview as you edit parameters
  • Four array-serialization styles for repeated keys: bracket, index, comma, repeat
  • Per-row enable toggles to include or exclude params without deleting them
  • Inline validation: errors for empty keys and keys with "=", warnings for spaces and very long values
  • "Parse from URL" reverses an existing query string back into editable rows
  • Stats strip showing enabled/total param counts and encoded length
  • Parameter list persists locally between visits

Common Use Cases

  • Constructing API request URLs with pagination, filter, and sort parameters
  • Deciding which array format your backend expects (PHP brackets vs. repeated keys)
  • Decomposing a long URL into its parameters to inspect or edit them
  • Building tracking or campaign URLs with consistent encoding
  • Verifying that special characters in values are correctly percent-encoded

URL & options

Parameters

Params 2/2Encoded length 15

Live preview

https://api.example.com/users?page=1&limit=20

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools