Line Sorter & List Tools
Work on lists one line at a time: sort, remove or isolate duplicates, compare two lists, extract columns, count frequency, add prefixes and suffixes, and more.
Operations at a glance
Paste one item per line, choose an operation and read the result. Preparation switches (trim whitespace, ignore case, drop empty lines) run first, so “Apple”, “apple ” and “APPLE” can count as the same item.
- Sort: A → Z, Z → A (natural order, so file2 comes before file10), numeric ascending or descending (uses the first number in each line), shortest or longest first.
- Filter: remove duplicates (keeps first occurrence), unique only, duplicates only, keep or drop lines containing text, keep lines matching a regex, first N lines, last N lines and a random sample of N lines.
- Transform: number lines, reverse, shuffle, add prefix and suffix, join with a delimiter, split into lines, group every N lines into one, and extract column N from delimited lines.
- Count frequency: each distinct line with how often it appears, most common first.
- Compare two lists: items in A but not B, items in both, or the unique union of A and B.
Real-world recipes
- Clean a mailing list: trim, ignore case, remove duplicates, sort.
- Build an SQL IN list: prefix and suffix with a quote mark, then join with a comma.
- Turn a CSV row into a column: split by comma.
- Pull one column out of a CSV: choose Extract column, set the delimiter to a comma and the column number.
- Find new subscribers: put this month’s list in A and last month’s in B, then choose “In A, not in B”.
- Find your most repeated entries: count frequency.
- Pick a winner: random sample of 1 line.
Good to know
Sorting uses your browser’s locale rules, so accented letters sort sensibly. Delimiter fields understand \n and \t for line breaks and tabs. Shuffle and sampling use a Fisher–Yates shuffle, which gives every ordering equal probability; for draws that must be provably fair, use an independently auditable method. The status line shows lines in, lines out and how many are unique.
Frequently asked questions
Does remove duplicates keep the original order?
Yes. The first occurrence stays where it was; later copies are removed.
How do I compare two lists?
Put the first list in the main box and the second in List B, then choose one of the compare operations.
Can I sort numbers numerically?
Yes. Use Numeric ↑ or ↓, or the natural A → Z sort, which treats digit runs as numbers.
What does Count frequency output?
A count, a tab, then the line, ordered from most to least frequent.
How big a list can it handle?
Tens of thousands of lines work well on a normal computer. Very large lists may slow your browser.