Home › Text Tools › Remove Duplicate Lines

Remove Duplicate Lines

Paste a list and every repeated line is removed instantly. Ignore case, extra spaces or accents, keep the first or last copy, sort the result, and see exactly which lines were duplicates.

0 lines
0 lines

Results update live. Everything runs in your browser, so even lists of 100,000+ lines are processed instantly and never uploaded.

Advertisement
Advertisement

How to use the Remove Duplicate Lines

  1. Paste your list into the left box, one item per line (or choose commas, tabs or another separator).
  2. Choose how to match: ignore case, trim spaces, ignore extra spaces inside lines or ignore accents.
  3. Pick what to keep: the first copy, the last copy, only lines that never repeat, or only the repeated lines.
  4. Sort the result if you like, then check the counts and the Removed tab.
  5. Copy or download the unique lines, or press Use result as input to keep working on them.

What each option does

OptionExample inputTreated as
Ignore upper/lower caseApple, apple, APPLEone line
Trim spaces at line ends"apple" and " apple "one line
Ignore extra spaces inside lines"New York" and "New York"one line
Ignore accentscafé, cafeone line
Remove empty linesblank or space-only linesdeleted from the result

The line that is kept is shown exactly as you typed it (after trimming), so the matching options never change your text, only which lines count as the same.

Keep first, keep last, unique only, or duplicates only

For the list a, b, a, c, b, a:

  • Keep the first copy gives a, b, c (3 duplicates removed).
  • Keep the last copy gives c, b, a, the order in which each item last appears.
  • Remove every line that repeats gives c, the only item that appears once.
  • Show only lines that repeat gives a, b, handy for spotting double entries.

Tip: to find lines that two lists have in common, paste both lists together and choose Show only lines that repeat (make sure neither list has internal duplicates first).

Frequently asked questions

How do I remove duplicate lines from a list?

Paste the list into the input box. Duplicate lines are removed immediately and the unique lines appear on the right, in their original order. Press Copy result or Download .txt to save them.

Is the comparison case-sensitive?

By default no: Apple, APPLE and apple count as the same line and the first one you wrote is kept. Untick Ignore upper/lower case to treat them as different lines.

What is the difference between keep first and keep last?

Both leave one copy of every line. Keep the first copy keeps each line at the position where it first appears; keep the last copy keeps it where it appears last, which is useful when later entries are newer.

Can I remove both copies of a duplicated line?

Yes. Choose Remove every line that repeats. Only lines that appear exactly once are kept, which is handy for finding unique entries between two merged lists.

Can it remove duplicate words or comma-separated values?

Yes. Set Items are separated by to Commas, Semicolons, Tabs or Spaces. The result is joined with the same separator.

How many lines can it handle?

Hundreds of thousands. It uses a hash map, so even very long lists are processed in a fraction of a second, all inside your browser with nothing uploaded.

Related tools

Sort Lines AlphabeticallySort a list A-Z, Z-A, numerically, naturally or by length, or shuffle it.Remove Line BreaksStrip line breaks and extra spaces, keep paragraphs if you want.Text CompareFind the differences between two texts.Word Frequency CounterFind the most used words and phrases in any text and turn them into a word cloud.Word CounterCount words and characters and clean up text.Character CounterCount characters with and without spaces, words, lines and bytes, with live limit bars.Word Count to PagesHow many pages is 1,000 words? Estimate pages by font, size, spacing and margins.Case ConverterConvert text to UPPERCASE, lowercase, Title Case, camelCase and more.Citation GeneratorCreate APA, MLA and Chicago citations for books, websites and articles.MLA Format GeneratorBuild an MLA 9 heading, title page layout and Works Cited entries.Bibliography GeneratorBuild an alphabetized bibliography in APA 7, MLA 9, Chicago or Harvard style.Essay Length & Reading TimeWords to reading time, speaking time and handwritten or typed pages.Lorem Ipsum GeneratorGenerate placeholder text as paragraphs, words or lists, with HTML.Instagram Caption FormatterKeep line breaks and spacing in Instagram captions and bios.Instagram Bio GeneratorCreate Instagram bios with templates, fancy fonts and emojis.X Post Character CounterCount X (Twitter) post characters and split long text into a thread.TikTok Caption CounterCount TikTok caption characters and hashtags against the 2,200 limit.Speech Length CalculatorPaste a speech to see how long it takes to say at any speaking speed.Text to SpeechTurn text into natural-sounding speech.Fancy Text GeneratorTurn text into cool Unicode fonts for bios.Reverse Text GeneratorWrite text backwards, reverse words or lines, mirror or flip it upside down.Upside Down Text GeneratorFlip text upside down with Unicode characters, or turn it back to normal.Text RepeaterRepeat any text or emoji up to 100,000 times with custom separators.YouTube Title Length CheckerCheck YouTube title length, preview truncation and score it for clicks.YouTube Description & Chapters GeneratorBuild a YouTube description with chapters, links and hashtags from templates.AI Prompt GeneratorBuild better prompts for ChatGPT, Midjourney and more.Email Signature GeneratorBuild HTML email signatures for Gmail and Outlook.Flashcard MakerMake flashcard decks and study them with flip cards and spaced repetition, saved in your browser.Find and Replace TextFind and replace words or regex patterns in any text, with match highlighting and undo.YouTube Tag GeneratorGenerate YouTube tag ideas from your title and keywords and fit them in the 500-character limit.Quiz MakerMake a multiple-choice quiz, take it with instant scoring and share it with a link.Add Line NumbersNumber every line of your text with custom start, step, padding and separator, or remove numbers.Add Prefix and Suffix to LinesAdd text to the start and end of every line: quotes, commas, bullets or SQL lists.Comma SeparatorTurn a column of lines into a comma separated list and back, with any delimiter.LinkedIn Post FormatterAdd bold, italic and other Unicode styles to LinkedIn posts and preview the fold.Social Media Post PreviewMock up a post for X, Facebook, Instagram, LinkedIn or Threads and save it as a PNG.Sentence CounterCount sentences and paragraphs, see average sentence length and spot long sentences.Emoji CounterCount every emoji in your text, including flags, skin tones and ZWJ sequences.Readability CheckerScore your text with Flesch, Flesch-Kincaid, Gunning Fog, SMOG and more readability tests.Text to Handwriting ConverterTurn typed text into realistic handwriting on notebook paper and save it as PNG or PDF.Keyword Density CheckerFind the most used 1, 2 and 3-word phrases in your text and their keyword density %.Title Capitalization ToolCapitalize titles and headlines in AP, APA, Chicago and MLA style side by side, with one-click copy.Accent KeyboardClick to insert é, ñ, ü, ç, ß and other accented letters for 11 languages, then copy.Small Text GeneratorTurn text into tiny superscript, subscript and small caps letters you can copy and paste.Headline AnalyzerScore your headline 0–100 on length, word balance, power words, sentiment and type, with tips.Cyrillic TransliterationConvert Bulgarian, Russian and Ukrainian Cyrillic to Latin and back using official rules.Zalgo Text GeneratorMake creepy glitch text with separate up, middle and down sliders, or clean zalgo back to normal.Arabic KeyboardType Arabic online with a full on-screen keyboard, harakat and Arabic-Indic digits, then copy.Invisible CharacterCopy blank and invisible characters (ㅤ U+3164, U+2800, zero width space) for names and messages.Reading Time CalculatorEstimate how long a text takes to read or speak at any speed, and copy a “5 min read” badge.Russian KeyboardType Russian online with a ЙЦУКЕН or phonetic on-screen keyboard, then copy your Cyrillic text.Emoji PickerSearch 1,900+ emoji by name, pick skin tones and copy and paste them with one click.Japanese Kana ConverterConvert romaji to hiragana or katakana, kana to romaji, and hiragana to katakana instantly.Special CharactersCopy and paste 1,500+ symbols: arrows, math, currency, stars, checkmarks, © ® ™ and more.Pinyin Tone ConverterTurn pinyin tone numbers (ni3 hao3) into tone marks (nǐ hǎo), or tone marks back into numbers.Word UnscramblerUnscramble letters into every possible word, with blank tiles, length filters and Scrabble scores.Remove Extra SpacesClean up double spaces, tabs, blank lines, non-breaking and invisible spaces in one click.ROT13 Encoder / DecoderEncode and decode ROT13, ROT47, ROT5, ROT18 and any Caesar shift live as you type.Random Word GeneratorGenerate random English words by type, length, first letter and syllables, then copy them.Palindrome CheckerCheck if a word, sentence or number is a palindrome and find the longest palindrome in text.Syllable CounterCount syllables per word, line and total, and check haiku 5-7-5 instantly.List RandomizerShuffle a list into random order, pick random items or split it into fair teams.Email ExtractorPull every unique email address out of text or files, sort, filter by domain and export CSV.URL ExtractorExtract every link from text or HTML, remove duplicates, filter by domain or protocol.NATO Phonetic Alphabet TranslatorSpell any text as Alfa, Bravo, Charlie, hear it spoken, or decode code words back to text.Braille TranslatorTranslate English text to Grade 1 Unicode braille and back, with dot numbers and printing.Text SummarizerSummarize long text into its key sentences and keywords, privately in your browser.Strip HTML TagsRemove HTML tags and get clean plain text with line breaks and decoded entities.Speech to TextDictate with your voice and get editable text in 50+ languages, with voice punctuation.ASCII Art GeneratorTurn text into big ASCII banners or convert any image into ASCII art you can copy.Online NotepadPrivate notepad that autosaves notes in your browser, with find, word count and .txt download.Bold Text GeneratorConvert text to bold Unicode letters you can copy and paste anywhere.Italic Text GeneratorConvert text to italic Unicode letters you can copy and paste anywhere.Cursive Text GeneratorConvert text to cursive Unicode letters you can copy and paste anywhere.Strikethrough Text GeneratorConvert text to strikethrough Unicode letters you can copy and paste anywhere.Underline Text GeneratorConvert text to underlined Unicode letters you can copy and paste anywhere.Bubble Text GeneratorConvert text to bubble Unicode letters you can copy and paste anywhere.Wide Text GeneratorConvert text to wide Unicode letters you can copy and paste anywhere.Old English Text GeneratorConvert text to Old English Unicode letters you can copy and paste anywhere.Superscript GeneratorConvert text to superscript Unicode letters you can copy and paste anywhere.Subscript GeneratorConvert text to subscript Unicode letters you can copy and paste anywhere.