Line Tools
Sort, dedupe, count, filter, shuffle, trim and number lines of text.
How to use the Line Tools
- 1Paste a list, one item per line.
- 2Stack steps such as trim, remove duplicates, count, sort, filter and number. Each step shows how many lines are left after it.
- 3Copy the cleaned list, or use it as the next input.
About Line Tools
Line Tools is a small pipeline for lists and other line-based text. Paste a list with one item per line and stack steps that run in order: trim spaces, remove empty lines, remove duplicates, count occurrences, sort, reverse, add a prefix or suffix, number lines or remove numbering, filter lines by text or regular expression, keep a range, join everything into one line, split lines at a delimiter, or wrap long lines at a fixed width.
Each step has its own options and shows how many lines remain after it, and steps can be switched off, moved up or down, or removed to compare results. Sorting covers A to Z and Z to A, natural order (2 before 10), numbers, length and a repeatable shuffle, and it can sort by a column of comma, tab or space separated data. Counting produces a frequency list in a format you choose, and filters keep or remove matching lines, with or without regard to case.
Typical jobs: alphabetize a list of names, clean up an email list, turn a spreadsheet column into one comma-separated line, number the lines of a script, keep every n-th line of a log, or prepare keyword lists. The result can be copied, downloaded or used as the next input.
Frequently asked questions
What is natural sort?
Natural sort orders numbers inside text by their value, so item 2 comes before item 10. Plain alphabetical sorting compares character by character and puts item 10 first.
Can I sort by a column or by numbers?
Yes. The sort step can sort by any column of comma, tab or space separated lines, and by the first number in each line, smallest or largest first.
How do I count how often each line appears?
Add the Count occurrences step. It lists every distinct line once with its number, most frequent first, in a format you choose, for example with a tab for pasting into a spreadsheet.
How do I shuffle a list randomly?
Add a Sort step and choose Shuffle. The order comes from a seed number: the same seed always gives the same order, so a draw can be repeated and checked, and a different seed gives a new order.
More in Text & Writing
Count words, characters, sentences and reading time as you type.
Convert text to UPPER, lower, Title, Sentence, camelCase, snake_case and more.
Compare two texts and see every added, removed and changed word.