urltoolskit.org
URL utilities, in the browser
Say hi →

Query parameter diff

two URLs, parameter by parameter · order-independent · Markdown export

"It works with this URL but not that one" is almost always a query-string difference, and eyeballing two forty-parameter URLs does not find it. Paste both and get one row per parameter name with an explicit verdict: same, changed, only in A, only in B. Parameter order is ignored, because servers ignore it too.

Summary

Ready.

How to use

  1. Paste the working URL into A and the failing one into B. The diff appears as you type.
  2. Set Show to Changed only when both URLs have many parameters — that is usually a three-row answer.
  3. Read the Summary for the counts, and for whether the origin and path are identical. A difference there means the query string is not your problem at all.
  4. Copy as Markdown table produces a diff you can paste into a ticket or pull request.

Repeated parameters and empty values

A parameter can legally appear more than once — ?tag=red&tag=blue — and frameworks disagree about what that means: PHP keeps the last value, Rails wants tag[], Express gives you an array, and Go's r.URL.Query().Get returns the first. This tool keeps every occurrence and joins them with |, so a URL with two tag values never looks the same as one with a single value. Order within a repeated parameter is preserved and does count as a difference, because for array-style parameters it usually matters.

Empty values are also kept distinct: ?debug= (present, empty) shows as an empty string, while a parameter that is absent shows as . That distinction is the cause of a surprising share of "same URL, different behaviour" bugs, since many frameworks treat a present-but-empty flag as true.

FAQ

Can I paste bare query strings instead of full URLs?

Yes. Anything that is not a parseable URL is read as a query string, so a=1&b=2 works on its own. The origin-and-path row in the summary is skipped in that case.

Are values compared decoded or raw?

Decoded. ?q=hello%20world and ?q=hello+world both read as hello world and count as the same, which is what the server will see. If you need to compare the raw encoding instead, use the URL diff tool.

Does parameter order matter?

Not for the diff — the table is keyed by name. Order does matter for caching and for signed URLs, though; the URL normalizer can sort parameters so two equivalent URLs produce the same cache key.

What about the fragment?

Not compared here, since fragments are never sent to the server. For fragment-based routing differences, use the URL diff.