Clean Text · browser-local
Remove Duplicate Lines
Deduplicate copied lists without sorting them. V1 compares trimmed lines case-sensitively, retains the first exact match, and leaves the original input untouched for audit.
- Index state
- eligible
- Reviewed
- 2026-08-24
- Input limit
- 5,000 graphemes
Remove Duplicate Lines
alpha beta gamma
Good fit
Use this tool when
- A keyword, email, or inventory list contains repeated rows.
- First-seen order matters.
- You want predictable case-sensitive matching.
Keep the original
Avoid it when
- Near-duplicates need fuzzy matching.
- Uppercase and lowercase should count as identical.
- Rows contain structured CSV fields with embedded line breaks.
Reviewed truth vectors
Examples that expose the edge cases
red
blue
redred
blueThe second exact red line is removed.
A
A
B A
BTrimmed values are compared; the first original row is retained.
Apple
appleApple
appleV1 comparison is case-sensitive.
Transparent implementation
How it works
- 01
Normalize line endings and split the input.
- 02
Trim each line to build a comparison key.
- 03
Keep the first key and discard later exact matches without sorting.
Known limitations
What the result cannot promise
Case variants are treated as different lines.
Visually identical Unicode sequences may need normalization first.
The A1 interface does not perform fuzzy matching.
Questions before copying
Frequently asked questions
Does it change the line order?
No. It keeps the order of each first occurrence.
Are blank lines deduplicated?
Yes. Multiple blank or whitespace-only rows share the same trimmed comparison key.
Why do two identical-looking lines remain?
They may differ by case, normalization, or invisible characters. Inspect or normalize them first.
Experience, expertise & trust
How we verify this tool
Automated evidence
- Tool-contract & coverage suite30 deterministic cases
tests/tools-30.test.mjs mirrors the ToolRunner dispatch and asserts every registered engineId returns the contracted output shape, plus a coverage guard so no tool silently drops characters.
Run in: node --test after a production build (vinext build) - Rendered-HTML suite12 deterministic cases
tests/rendered-html.test.mjs renders the deployed server bundle and asserts the Unicode-version manifest and each wave's tool markup are present in the server-rendered HTML.
Run in: node --test against the built dist/server bundle - Transform & cleanup suite21 deterministic cases
tests/transform-cleanup.test.mjs exercises each deterministic cleanup and transform action against whitespace, duplicate, ordering, casing, and HTML-to-text edge cases.
Run in: node --test, no network, no randomness
Standards this tool follows
- UAX #29: Unicode Text Segmentation
Grapheme and word boundaries underpinning line and whitespace operations.
- UAX #14: Unicode Line Breaking Algorithm
Line-break semantics behind hard-wrap repair.