Remove duplicate lines
Paste a list. Get it back with every repeated line gone. Free, no sign-up. Your text never leaves this page: the tool runs in your browser and sends nothing anywhere.
How to compare lines
You're on the list. We'll email you once.
What each option does
| Option | What changes |
|---|---|
| Ignore case | "Apple", "APPLE" and "apple" count as one line. The copy that stays keeps its own letters. Turn it off and they are three lines. |
| Ignore spaces at the ends | "banana" and " banana " count as one line, and the spaces are removed from the result. Spaces inside a line are not touched. |
| Keep the last copy | By default the first copy of a line stays and later copies go. Tick this to keep the last copy instead. The order of the lines that stay is the order they appear in your list. |
| Keep blank lines | Empty lines are not counted as repeats, so the gaps in your list stay. Untick it to keep only one empty line. |
| Sort A to Z | Puts the lines that are left in alphabetical order. |
Remove duplicate lines without a tool
In Google Sheets, paste the lines into one column, then choose Data > Data cleanup > Remove duplicates. In Notepad++ or VS Code, sort the lines first, then use the built-in command that removes consecutive duplicate lines. On Linux, sort -u file.txt sorts and removes repeats in one step. This page is for when you just want to paste, click and copy.
Is my text private?
Yes. The tool is one readable script, tool.js (no libraries), which works only on what is in the box. It makes no network requests and stores nothing; you can disconnect from the internet after the page loads and it keeps working. Separately, the page sends one cookie-free page view count when it loads (the page address and the referring site, never your text; see privacy).
In Google Docs: ReplaceKit finds and replaces inside the document
Copying text out of a document and back loses its headings, bold and links. ReplaceKit, the Google Docs add-on we are building, finds and replaces in place, only in your selection if you want, with formatting kept and a preview of each match. The same cleanups are on the remove line breaks tool, the remove extra spaces tool and the case converter.
ReplaceKit is built and in testing. It is not in the Google Workspace Marketplace yet. Leave your email and we send one message when you can install it.
Free version: every find and replace, no click limit or trial clock.
More free ReplaceKit tools and guides
- Compare two texts and see the differences
- Add text to the start or end of each line
- Convert a column to a comma separated list
- Case converter (UPPER, lower, Title Case, Sentence case)
- Remove formatting from text
- Remove extra spaces from text
- Remove line breaks online (and fix pasted PDF text)
- Bulk find and replace (a whole list of pairs at once)
- Regex find and replace in Google Docs
- Find and replace in Google Docs on Android and iPhone