Developer Tools
View All Developer ToolsDate & Time
View All Date & Time ToolsText Tools
View All Text ToolsOnline Converters
View All Online ConvertersURL Query Sorter
Sort query parameters in a full URL or raw query string by key while preserving repeated key order and full URL context.
Sort query parameters in a copied URL or raw query string
Paste a full URL or raw query string, choose ascending or descending key order, and copy the rebuilt sorted output.
Alphabetize query parameter keys without editing each pair by hand
Use URL Query Sorter when you need a stable query string order for copied URLs, callback examples, cache keys, docs, or debugging output. It sorts parameter keys while preserving repeated key order and keeps the full URL path and fragment when the source started as a full URL.
Paste a full URL or raw query string to sort its parameters alphabetically by key.
Sorted query result
Review the rebuilt query output, confirm whether parameters moved, and copy the sorted URL or query string when it is ready.
Sorted output will appear here.
The result card will rebuild the query in ascending or descending key order as soon as the input is valid.
How to use URL Query Sorter
- Paste a full absolute URL or a raw query string into the source field.
- Leave descending order off for A to Z sorting, or turn it on when you want the reverse key order.
- Turn on the question mark option only when you want raw query output prefixed with `?`.
- Review the rebuilt sorted URL or sorted query string in the result card.
- Use Copy Result when the sorted output matches the query order you want to keep.
URL Query Sorter examples
-
sort query parameters alphabetically
-
url query sorter
-
query string sorter
-
alphabetize a copied URL query string
-
sort b=2&a=1&ref=docs into key order
What this URL Query Sorter does
This tool sorts query parameters by key and rebuilds the result in a deterministic order. It works with either a full URL or only the raw query string, so you can sort URL parameters online, normalize a copied callback example, or alphabetize a query string before sharing it in docs, logs, or test cases.
When sorting query parameters is useful
Sorting query parameters is useful when you want a stable query string for screenshots, support examples, code review, caching checks, or cleaner diffs. Instead of manually moving one pair at a time, you can sort the current URL query and copy the rebuilt output immediately.
URL Query Sorter vs URL Query Editor
URL Query Sorter is for one narrow task: reorder the existing parameters by key. URL Query Editor is better when you need to add rows, remove rows, or change values one by one. If the structure is right and you only want sorted output, the sorter is the faster fit.
URL Query Sorter FAQs
Can I sort a full URL and not just a raw query string?
Yes. You can paste either a full absolute URL or only the raw query string. Full URL inputs keep their original path and fragment while the query portion is rebuilt.
Does the sorter keep repeated parameter keys?
Yes. Repeated keys stay together in the sorted result, and matching repeated keys keep their original relative order within that key.
Can I sort in descending order too?
Yes. Turn on descending order when you want the keys sorted from Z to A instead of the default ascending order.
Does this tool change parameter values?
No. It only rebuilds the parameter order. The existing keys, values, and repeated pairs stay intact.
Will the raw query output include a question mark?
You can choose that. The question mark option only affects raw query string output and lets you copy either `a=1&b=2` or `?a=1&b=2`.