Rank list items by how often they appear
Sort a list by frequency when you want the popular items at the top, not the alphabetical ones. The tool counts every item, then orders them by that count - most frequent first by default, or least frequent first with one toggle.
By default each unique item is shown once, prefixed with its count (`3 apple`). Turn Show count off for a clean ranked list with no numbers, or turn Keep duplicates on to keep every occurrence and simply group identical items next to each other.
Counting is case-insensitive by default, so "Apple" and "apple" are treated as the same item; the first spelling seen is the one displayed. Flip Case sensitive on to count them separately. Ties are broken alphabetically (natural order, so "item2" sorts before "item10").
It all runs entirely in your browser as you type - your list is processed locally and nothing is uploaded.
How to use sort a list by frequency
- 1Paste or type your list into the input panel - one item per line.
- 2Leave Order on Most first for a popularity ranking, or switch to Least first to surface rare items.
- 3Keep Show count on to see each item's tally, or turn it off for a bare ranked list.
- 4Turn Keep duplicates on if you want every occurrence retained and grouped instead of collapsed to one line each.
- 5Copy the result, or hit Download to save it as a plain text file.
Keyboard shortcuts
Drive ListShift without touching the mouse.
What Sort by Frequency does
Five ways to turn a raw list into a frequency-ranked one.
Surface the most common items
With Order on Most first, the items that appear the most rise to the top. Paste survey answers, tags, log lines, or search terms and read the popularity ranking straight off the output.
Find the rare ones too
Flip Order to Least first and the one-off entries float to the top instead - a fast way to spot typos, outliers, or values that appear only once in a large list.
Counts on or off
Show count prefixes each line with its tally (`3 apple`), tab-separated so it pastes cleanly into a spreadsheet. Turn it off when you just want the items in popularity order with no numbers.
Collapse or keep duplicates
By default each item appears once. Turn Keep duplicates on to retain every occurrence, grouped together - useful when you need the full list reordered rather than summarised.
Case-aware counting
Counting folds case by default so "Apple" and "apple" tally together under the first spelling seen. Turn Case sensitive on to count differing cases as distinct items.
Worked example
Most-frequent first, each unique item collapsed to one line with its count (tab-separated).
apple banana apple cherry banana apple
3 apple 2 banana 1 cherry
Settings reference
Four toggles control ordering, counts, duplicates, and case.
| Setting | What it does | Default |
|---|---|---|
| Order | Most first (descending) or Least first (ascending) by count | Most first |
| Show count | Prefix each line with its tally, tab-separated | On |
| Keep duplicates | Retain every occurrence (grouped) instead of one line per item; counts are not prefixed in this mode | Off |
| Case sensitive | Count differing-case spellings as separate items | Off |