Tidy up messy multi-line text: sort, dedupe, remove empty lines, trim spaces. One click, clean result.
| Operation | What it is for |
|---|---|
| Remove duplicates | Cleaning a list of URLs, emails or IDs before import |
| Sort | Alphabetical, reverse, or numeric ordering |
| Remove empty lines | Tidying output pasted from a PDF or a spreadsheet |
| Trim whitespace | Removing invisible leading and trailing spaces that break matching |
| Add prefix / suffix | Turning a bare list into quoted strings, SQL values or CSV rows |
| Number lines | Referencing specific rows in a review |
Plain string sorting compares character codes, which puts 10 before 9 and handles case inconsistently — in a strict comparison an uppercase Z sorts before a lowercase a. A numeric sort parses values first, so 2 precedes 10. A case-insensitive sort ignores capitalisation entirely. Pick the mode that matches your data, and expect different tools to default differently.
Unix systems end lines with \n; Windows traditionally uses \r\n; classic Macs used a bare \r. Mixed line endings are a frequent cause of "everything on one line" imports and of diffs where every line appears changed even though the text is identical. When a file misbehaves after being moved between systems, check the line endings before anything else.
"value" and "value " survive as separate entries; trimming first is almost always the right move.