API Debugging beginner 8 min

Inspect Query Params From a Failing URL

Turn a long query string into readable key-value data before debugging an API request.

Scenario

A search URL misbehaves for exactly one user, and the link they shared carries a long query string. Two things hide in it that eyes skip over: percent-encoded values (q=toolzy%20learn) that need decoding before they mean anything, and debug=true&debug=false — the same key twice with conflicting values. Which value wins depends on the framework, which is precisely the kind of bug that reproduces on one stack and not another.

Broken input

https://example.test/search?q=toolzy%20learn&page=2&debug=true&debug=false

Goal

Use Query String Parser / JSON Converter to explode the query string into structured key-value data where duplicates and encodings are explicit instead of invisible.

Tool sequence

  1. Open Query String Parser / JSON Converter.
  2. Paste the URL or its query string as shared by the user — do not pre-clean it; the mess is the evidence.
  3. Read the parsed output: q decodes to toolzy learn, page is 2, and debug appears twice.
  4. The duplicate debug key is the lead: server-side parsers commonly keep the last value (false), some keep the first, and some produce an array — so the user's client and your server may disagree about debug mode.
  5. Trace where the URL was constructed to find which code path appended the second debug; if the rest of the URL also needs checking, parse the full thing with URL Parser / Inspector.

Checkpoint output

{
  "q": "toolzy learn",
  "page": "2",
  "debug": ["true", "false"]
}

q decodes cleanly, and debug carries two conflicting values — the failing behavior depends on which one the receiving framework keeps.

Common mistakes

  • Reading %20 and friends without decoding, then hunting for a "toolzy%20learn" record that does not exist.
  • Missing duplicate parameters because URLSearchParams.get() only returns the first value and hides the rest.
  • Editing the full URL by hand before isolating which parameter actually breaks the request.
  • Assuming duplicate keys collapse the same way in every framework — Express, Rails, and PHP each have their own rule.

Related tools and lessons