Report

Help us improve this tool

URL Query Sorter

Reorder and deduplicate URL query keys for stable canonical links and cache-friendly URLs.

O M T

Sort URL query parameters for stable links

Query string order is undefined in many stacks, yet reverse proxies, caches, and signature validators often compare the raw URL byte-for-byte. Sorting keys alphabetically produces a predictable representation for the same logical parameters, which helps canonical URLs, regression tests, and log deduplication.

Deduplicate repeated keys

Marketing and analytics tags sometimes append duplicate keys (utm_source twice, for example). Enable deduplication to keep the first value per key while sorting. Pair this with the Query Params Diff tool when you need to see what changed between two URLs.

Paste either a full URL or a bare query string (with or without a leading ?). Optional + encoding matches application/x-www-form-urlencoded conventions.

Frequently Asked Questions

Will sorting break signed URLs?

Yes, if the signature covers the exact query string. Only reorder parameters on unsigned URLs or when your signing spec explicitly canonicalizes order first.

How are bracket-style keys handled?

Keys are sorted as literal strings, so filter[color] sorts like any other parameter name. Nested parsing is handled by the Query String Parser instead.

Does this tool normalize the hostname?

For full URLs it preserves the host and path while rewriting the query. Use the URL Normalizer for host case, ports, and path cleanup.