Remove Duplicate Lines and Clean Up Any List
Paste a list, choose what to clean and copy the result. Remove duplicate and blank lines, trim spaces, strip bullets, sort the lines and join them with the separator you need
Your List
Cleaning options
Options run in a fixed order, from the top of this list to the bottom. Your text never leaves your browser.
Paste or type a list to see the result
How to use this tool
- Paste your list into the box, one item per line, or press Try an example.
- Switch the cleaning options on or off. The result updates as you change them, and the counters show how many lines were removed.
- Pick a sort order, a separator and quotes if you need them, then press Copy Result.
Worked example
Pasting the seven lines of the sample below with the default options gives four lines: one blank line and two exact duplicates are removed. Turning on “ignore case” and sorting A to Z leaves three. To paste a column from a spreadsheet into a query, choose the comma separator and single quotes instead.
Methodology
The tool splits your text into lines at every line break (Windows, Mac and Linux line endings all work) and then applies the options you have switched on in a fixed order: trim spaces, collapse repeated spaces, remove bullets and numbers, remove blank lines, remove duplicates, sort or reverse, wrap in quotes and, last, join the lines with the separator you chose. The order matters. A line that holds only a bullet becomes blank before blank lines are removed, and duplicates are found after trimming, so “apple” and “apple ” count as the same item when trimming is on. Everything runs in your browser and nothing is uploaded or stored.
A sample list, before and after
The same seven lines, cleaned twice. Spaces around the third item are trimmed and the blank line is removed in both runs.
Input (7 lines)
Apple banana Apple Cherry banana apple
Default options (4 lines)
Apple banana Cherry apple
Ignore case + A to Z (3 lines)
Apple banana Cherry
With the default options the counters read 7 lines in, 4 out, 2 duplicates and 1 blank line removed. Typical uses are tidying email, keyword or tag lists, and cleaning a column before pasting it into a spreadsheet, a query or a form.
Frequently asked questions
How do I remove duplicate lines? ▼
Paste your list, keep “Remove duplicate lines” switched on and copy the result. The first copy of each line is kept and later copies are dropped. Turn on “Ignore uppercase and lowercase” if “Apple” and “apple” should count as the same line, and keep trimming on so extra spaces do not hide duplicates.
Does it change the order of my list? ▼
Not unless you ask. With “Keep original order” the remaining lines stay in the order you pasted them. You can also sort A to Z or Z to A, sort numbers, sort by length or reverse the list.
Can I turn a list into one comma-separated line? ▼
Yes. Choose a separator such as comma, comma and space, semicolon, tab, space or vertical bar, and optionally wrap each item in single or double quotes. It is handy for pasting a column from a spreadsheet into a query, a tag field or an email.
Is my text uploaded anywhere? ▼
No. The cleaning runs in your browser, so the text stays on your device and nothing is saved. If you reload or close the page, the box is empty again.
Why were some similar lines not treated as duplicates? ▼
Lines are compared exactly. A trailing space, a different capital letter, an accent or a different punctuation mark makes two lines different. Turn on trimming and “Ignore uppercase and lowercase” to catch the first two. The tool cannot know that two differently written names mean the same thing.