Developer Workflow

Fix broken URL query parameters

Diagnose malformed query strings, missing values, repeated keys, plus signs, and double-encoded parameters before shipping a redirect or API link.

Problem

Query strings fail when reserved characters are copied into values, repeated keys are handled differently by frameworks, or a value is encoded too early or too late. The link may still open, but the server receives different data than the sender intended.

When to use this

  • A redirect, webhook, or callback receives a missing or truncated query parameter.
  • A value contains `+`, `%20`, `%252F`, or `%253A` and you need to know which form is correct.
  • A repeated key such as `tag=one&tag=two` behaves differently across tools or frameworks.
  • A copied API URL has a nested JSONPath, callback URL, or search query inside one parameter.

Steps

  1. Step 1

    Parse the query string as a table

    Paste the query portion into Query String Parser so each key and value is visible. This prevents hidden truncation at `&` or `=`.

  2. Step 2

    Check empty and repeated keys

    Look for empty values, duplicated keys, and unexpected parameter order. Some apps keep the first value, some keep the last, and some preserve an array.

  3. Step 3

    Decode suspicious values once

    Use URL Encoder and Decoder for values containing `%25`, `%2F`, `%3F`, or `%26`. Decode once and compare the result before trying another pass.

  4. Step 4

    Rebuild the link from verified values

    After each key has the expected value, encode only values that contain reserved URL syntax, then rebuild the query string and retest the receiving app.

Example

Repair a nested callback parameter

Input

redirect=https://app.example.com/finish?code=abc&status=ok&utm_source=email

Output

redirect=https%3A%2F%2Fapp.example.com%2Ffinish%3Fcode%3Dabc%26status%3Dok&utm_source=email

Common mistakes

Treating plus signs as safe text

A plus sign can mean a literal plus or a space depending on parser rules. Decode and test before replacing it globally.

Fixing the wrong layer

If a nested URL is the value of one parameter, fix that nested value rather than rewriting the outer URL structure.

Assuming repeated keys are invalid

Repeated keys can be valid, but the receiving system must support them. Confirm whether it expects an array, first value, or last value.

FAQ

What is the safest way to fix a broken query string?

Parse the query into keys and values, decode suspicious values once, then encode only the values that contain reserved URL characters.

Why did my parameter disappear after an ampersand?

An unencoded `&` inside a value starts a new parameter. Encode nested URLs or text values before adding them to the outer query string.

Should repeated query parameters be removed?

Not automatically. Repeated keys are valid in many systems, but you must confirm how the receiving app interprets them.