Line tools
Six tools for a list of lines: removing the repeats, the blanks and the ragged spacing, or putting them in a different order. Paste, read, copy.
- Remove Duplicate LinesOne of each, in the order they first appeared.
- Sort LinesAlphabetical, with numbers in the right order.
- Remove Empty LinesBlank lines out, everything else untouched.
- Reverse Line OrderLast line first, contents unchanged.
- Shuffle LinesA genuinely random order, every time.
- Trim LinesRagged spacing off the ends of every line.
About line tools
These are the jobs that are trivial in a shell and irritating everywhere else. Sorting a list, removing duplicates, stripping the blank lines out of something pasted from a PDF: each is one command if you happen to be at a terminal with the right tool installed, and a fiddly manual exercise if you are not.
They are separate pages rather than one page with a dropdown, for the same reason the QR tools are separate. Removing duplicates and sorting are different things to want, people search for them by different names, and a page called "line tools" would rank for neither. The form is identical and the implementation is shared, which is where the duplication is actually avoided.
Two of them have a decision worth knowing about. Sorting uses a comparison that treats runs of digits as numbers, so item2 comes before item10 rather than after it, and ignores case so Apple sits beside apple. A plain byte sort gives the opposite on both counts, and there is a switch for anyone who needs it.
Shuffling is the one most often done wrong. Sorting a list with a comparator that returns a random answer produces something scrambled and is not a shuffle: the result is measurably lopsided because a comparison sort asks about specific pairs in an order that depends on the algorithm. This walks the list backwards swapping each item with a randomly chosen earlier one, drawing from the browser's cryptographic randomness, which gives every ordering an equal chance.
The rest deliberately do one thing each. Trimming does not remove blank lines, removing blank lines does not trim, and reversing does not touch the lines themselves. Combining them would mean guessing which of the two you meant.