Text Line Tools
✓ Link copiedA fast, all-in-one toolkit for working with text line by line. Remove duplicate lines, drop blank lines, trim leading and trailing whitespace, and sort — alphabetically, by line length, or numerically — in ascending or descending order. Toggle case sensitivity to control how duplicates and alphabetical sorting treat upper- and lowercase. Every change is applied live as you type, with a running count of input lines, output lines, and how many duplicates and empty lines were removed. Free, private, and runs entirely in your browser — your text never leaves your device.
How to use
Paste or type your lines into the input box. Turn on the options you need — trim whitespace, remove empty lines, remove duplicates — and pick a sort order and direction. The cleaned result appears in the output box instantly, and the counters show how many lines went in, how many came out, and how many duplicate and empty lines were removed. Use Copy to grab the result or Clear to start over.
Frequently asked questions
- In what order are the operations applied?
- Always the same predictable order: lines are trimmed first, then empty lines are removed, then duplicates are removed (keeping the first occurrence), and finally the remaining lines are sorted. This means whitespace-only lines are treated as empty when trim is on, and sorting always runs last.
- How does numeric sorting handle non-numbers?
- Numeric sort compares lines by their numeric value, so 2 comes before 10 (unlike plain alphabetical sorting). Lines that aren't valid numbers are grouped together at the end in ascending order, keeping their original relative order.
- What does the case-sensitive option do?
- It controls how duplicate removal and alphabetical sorting compare letters. When case sensitivity is off, lines like "Foo" and "foo" are treated as the same line for deduplication and ordered together when sorting alphabetically.