Text Line Tools
Remove duplicate or blank lines, trim, sort and reverse — all in one pass
What each operation guarantees
- Dedupe keeps first occurrences in original order — sorting stays a separate explicit step.
- Trim and empty-line removal run before dedupe so invisible whitespace cannot pose as unique lines.
- Reverse, sort and numbering touch line order only — no line content is ever rewritten.
The smallest toolkit that fixes messy lists
Cleanup in one pass
Tick remove duplicates, drop blank lines and trim each line, then layer on alphabetical sorting or a full reversal — every operation runs together on the same input, in one click.
First stays first
When a list contains repeated lines, only the first occurrence survives — the order of your remaining entries is untouched, so ranked lists and sequences keep their meaning.
Take the result with you
Line counts before and after the pass sit above each box, and the finished list copies to the clipboard or downloads as a .txt file ready for a spreadsheet import.
Frequently asked questions
In what order are the options applied?
Trim, then remove blank lines, then remove duplicates, then sort, then reverse — in that fixed order, so the result is predictable no matter which combination you check.
Does 'remove duplicates' keep the first or last occurrence?
The first occurrence of each line is kept; later repeats are dropped.
Is there a line limit?
No hard limit — it runs entirely in your browser, so very large pastes are only limited by your device's memory.
Related tools
What Are Text Line Tools?
Pasted lists are rarely clean: exports carry blank rows, scraped data repeats entries, copied logs hold stray spaces and unhelpful ordering. Text Line Tools repairs lists line by line with five combinable operations in a single pass — remove duplicates, remove blank lines, trim each line, sort ascending or descending, and reverse. The pipeline order is fixed: trim first so spaced variants match, then blank removal, then dedupe keeping the first occurrence, then the chosen sort, then optional reversal, with live line counts on both panes. Sorting uses locale-aware comparison, and finished text copies out or downloads as lines.txt.
Five operations in a fixed pipeline
- 🧹 Deduplication keeping the first occurrence, dropping later repeats
- 🚫 Blank-line removal treating whitespace-only lines as empty
- ✂️ Per-line trimming of leading and trailing space before all else
- 🅰️ Locale-aware alphabetical sort either way, or none at all
- 🔄 Full reversal applied last, flipping even a sorted list
Cleanup chores it absorbs
- Deduplicating subscriber or product lists from a CRM export
- Stripping padding from log excerpts before a support ticket
- Alphabetizing reference lists or reversing a ranking
Honestly noted: matching is exact, so lines differing by one character count as distinct, and locale collation may order mixed scripts unlike a raw code-point sort. All work happens locally in your browser with no uploads, so internal data cleans as freely as public lists. The explicit run button keeps large pastes from triggering work mid-typing.
Last updated · 2026-09-01