Boneyard Tools

Remove Duplicate Words From Text

Paste text to strip out repeated words, keeping the first time each word appears and the original left-to-right order. The result box shows a live count of how many words were dropped, and you can match case loosely or preserve the exact spacing of the words you keep.

How to remove duplicate words

  1. Paste or type your text into the 'Your text' box at the top.
  2. Tick 'Ignore case' if 'The' and 'the' should be treated as the same word (the first casing is the one kept).
  3. Leave 'Collapse extra spaces' on to join the kept words with single spaces, or turn it off to keep the original gaps.
  4. Watch the small 'removed' counter next to the Result label to see how many duplicates were dropped.
  5. Click Copy to grab the deduplicated text.

Examples

Drop repeated words (default settings)

the the cat cat sat
the cat sat

Ignore case so Cat, cat and CAT collapse to one

Cat cat CAT dog
Cat dog

Punctuation stays attached, so 'cat,' survives

cat cat, cat
cat cat,

Frequently asked questions

Which copy of a repeated word is kept?

The first occurrence is kept and every later identical word is removed, so the reading order never changes. If you enable Ignore case, the casing of that first copy is what appears in the result.

How are words split apart?

Words are separated by any run of whitespace, meaning spaces, tabs and line breaks. A maximal run of non-space characters counts as a single word, so attached punctuation travels with it.

Why is 'cat,' not removed when 'cat' is already there?

The trailing comma is part of the token, so 'cat,' and 'cat' are different words to the tool and only exact matches are dropped. If you need to ignore punctuation, strip it first or use the Duplicate Word Finder, which splits on non-letter characters.

What does 'Collapse extra spaces' do?

When it is on, the kept words are re-joined with a single space each, which tidies uneven spacing. When it is off, the original whitespace that preceded each kept word is preserved, so tabs and double spaces stay intact.

Does it remove consecutive duplicates only, or all repeats?

It removes every repeat anywhere in the text, not just back-to-back doubles. The first 'the' in a paragraph is kept and all later ones are dropped regardless of how far apart they sit.

Will it keep line breaks and paragraphs?

Line breaks count as whitespace between words. With Collapse extra spaces on the output becomes a single spaced line, and with it off the original breaks that preceded kept words are retained.

Is there a limit on how much text I can paste?

There is no hard cap. The deduplication runs in your browser, so the practical ceiling is your device memory, and even long articles process instantly.

What if I only want to see which words repeat, not remove them?

Use the Duplicate Word Finder instead. It lists every repeated word with a count and flags accidental doubles like 'the the' rather than rewriting your text.

Is my text private?

Yes. Everything runs locally in your browser and nothing is uploaded to a server, so sensitive or unpublished text never leaves your device.

Learn more

Related tools