← All tools

Text Deduplication

Remove duplicate lines or words locally in your browser, keep first or last occurrence, and view duplicate counts.

This tool runs entirely in your browser. Your input is never uploaded.

Text
Result
Total
8
Unique
4
Removed
4
Duplicate items
3

Duplicates

  • apple×3
  • banana×2
  • 橙子×2

Text Deduplication

Remove duplicate lines or words from any text without uploading it anywhere. Everything runs locally in your browser.

Features

  • By line or by word — deduplicate whole lines, or split text into words (whitespace-separated tokens, with Chinese characters split individually).
  • Keep first or last occurrence — preserve the order of the first appearance, or keep the last appearance and drop earlier duplicates.
  • Case sensitivity — optionally treat Apple and apple as different values.
  • Ignore surrounding spaces — trim leading and trailing whitespace before comparing, while keeping the original text in the output.
  • Sort after dedup — order the kept items with natural, case-insensitive sorting so item 2 comes before item 10.
  • Duplicate counts — see how many times each repeated value appeared, and export the result with counts appended.
  • Export — copy or download the deduplicated text as a .txt file.

All processing stays on your device; no data leaves the browser.

Related tools

A growing collection of browser-only tools. Your data stays on your device whenever the browser can handle the task.