Remove duplicate lines
Remove duplicate lines while preserving the first original occurrence.
About this tool
Remove matching lines while preserving the first original occurrence and source order. All removes duplicates anywhere; Adjacent removes only consecutive duplicates like uniq, without sorting. Options affect comparison keys, never the retained text. Changes update automatically after a short pause; Enter in settings or Ctrl/⌘+Enter in the source updates immediately.
Whitespace comparison trims line edges and collapses runs of Unicode whitespace to one space. Ignore case lowercases in the page language, not full Unicode case folding: ß and SS stay different. NFC compares canonically equivalent accent forms.
LF, CRLF and CR are recognized. A final newline terminates the last record rather than adding a phantom empty row; actual blank lines are compared normally. If removing a later duplicate leaves a real empty final line, an additional separator preserves it in TXT. Source uses the first detected ending style, including for mixed input; choose LF/CRLF/CR to set it explicitly. The textarea displays LF, while Copy/TXT preserve exact output bytes.
Open accepts UTF-8 files up to 8000000 bytes and 2000000 UTF-16 units. Failed or late imports never overwrite newer edits. Source and input settings are retained through this browser’s shared input store; results are not stored. Processing stays local. Limits: 2000000 UTF-16 units and 100000 lines. Edits invalidate old results. Clipboard fallback selects the full existing output; manual copying uses the browser’s LF representation.