Repeated Query Parameters – Parse Duplicate Keys as Arrays

Local only

Show how repeated query keys are preserved as arrays in parse mode.

28 chars · 1 line

59 chars · 7 lines

3 parameters2 unique keys1 repeated key

Repeated query parameter behavior

How repeated query parameters become JSON arrays

APIs often repeat one key to represent multiple selected values. VetaTool preserves those occurrences in order and emits a JSON array instead of discarding earlier values. This tool is free to use. No account or payment is required.

Last updated

What you can do here

  • Browser-native URLSearchParams behavior
  • Full URL and raw query parsing
  • Repeated parameter preservation
  • JSON object to query construction
  • Browser-local processing

Steps

  1. Paste the repeated-key query into Parse to JSON.
  2. Inspect the array created for the repeated key.
  3. Keep repeated parameters when the receiving API expects multi-value query semantics.

Repeated keys are data, not necessarily mistakes

A query such as tag=json&tag=tools contains two separate values for the same key. The parser counts both parameters and retains their original order.

When building from JSON, an array of primitives produces the same repeated-key shape in the generated query string.

Repeated tag parameters

Two tag values become one JSON array.

Query string

?tag=json&tag=tools&sort=asc

Parsed JSON

{
  "tag": [
    "json",
    "tools"
  ],
  "sort": "asc"
}

Common questions

Frequently asked questions

Does the last repeated value overwrite the first?

No. VetaTool collects repeated keys into arrays.

Is parameter order preserved?

Yes. Repeated values are appended in the order URLSearchParams exposes them.

Can Build Query create repeated parameters?

Yes. Use an array of primitive JSON values for that key.

Debugging a specific Query String issue? Browse Query String troubleshooting.