Duplicate / Text Cleanup Tool
Remove duplicate lines, trim whitespace, sort, change case and clean up blank lines in a list of text.
Runs locally in your browser
Duplicate frequency
- Banana2×
- apple2×
Discuss a result
Write a short summary and review it before posting. Your tool inputs are never copied automatically.
What is the Duplicate / Text Cleanup Tool?
This tool cleans up multi-line text: removing duplicate and blank lines, trimming whitespace, sorting and changing case.
How to use it
- 1Paste your lines of text.
- 2Toggle the cleanup options you want.
- 3Copy the cleaned result and stats.
How it works
Operations are applied in a predictable order (trim, then remove blanks, then dedupe, then sort) so results are stable and repeatable.
Limitations & notes
- Deduplication is case-sensitive unless you enable case-insensitive matching.
Frequently asked questions
Which copy of a duplicate line is kept?
The first occurrence stays in its original position and later repeats are dropped, so the order of your list is preserved unless you also enable sorting. With case-insensitive dedupe on, Apple, apple and APPLE count as one entry and the version that appears first is kept with its original capitalization. Trim whitespace is applied before dedupe, so apple and apple with a trailing space also merge.
Why does sorting put 10 before 2?
Sorting compares lines as text, letter by letter, using your browser's locale rules, so 10 comes before 2 because the character 1 sorts before 2. Uppercase and lowercase versions of a word sort near each other rather than all capitals first. To sort numbers numerically, pad them with leading zeros first, for example 02 and 10, or use a spreadsheet's numeric sort.
What does the duplicate frequency list show?
It lists up to 10 lines that appear more than once, with how many times each appears, most frequent first. Counting happens after trimming and case conversion but before blank lines and duplicates are removed, so it reflects your original data. This is handy for finding repeated email addresses or IDs in an export. A repeated empty line is shown as (blank line).
How do I clean a list pasted from Excel or a CSV column?
Copy the single column and paste it here: each cell becomes one line. Keep trim whitespace on, which also removes the stray carriage returns that Windows line endings leave behind, enable remove blank lines and remove duplicates, then copy the output back. The tool works on whole lines only, so it does not split a multi-column CSV row into separate values.
What is the difference between Sort descending and Reverse lines?
Sort descending only takes effect when Sort lines is also checked, and gives Z to A order. Reverse lines flips whatever order the list has at that point, so on an unsorted list it simply puts the last line first, which is useful for log files or chronological lists. Enabling both sort descending and reverse returns the list to A to Z.
No directly related discussion yet.
Start a focused thread and share the question this tool helped you explore.
Ask the community about Duplicate / Text Cleanup Tool