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.

Works on up to 5,000 characters and 20,000 code points per field (at most 64 code points per character), processed in your browser.

27 graphemes27 code points27 bytes

Live result

Output

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.
01

Reviewed truth vectors

Examples that expose the edge cases

Inputred blue red
Outputred blue

The second exact red line is removed.

Input A A B
Output A B

Trimmed values are compared; the first original row is retained.

Inputa b a
Outputa b

Blank rows are kept; only the repeated a is removed.

02

Transparent implementation

How it works

  1. 01

    Normalize line endings and split the input.

  2. 02

    Trim each line to build a comparison key.

  3. 03

    Keep the first key and discard later exact matches without sorting.

03

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.

04

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?

No. Blank and whitespace-only rows are always kept, so paragraph spacing survives. Use Remove Empty Lines if you want them gone.

Why do two identical-looking lines remain?

They may differ by case, normalization, or invisible characters. Inspect or normalize them first.

05

Testing and sources

How this tool is tested

GlyphSift Editorial — Text-engine notes written and reviewed by Hommer Zhao, Founder & General Manager

GlyphSift Editorial is the site's writing and review process, led by Hommer Zhao, who is accountable for every tool page and correction. Each tool's examples are written against real Unicode edge cases and checked against the engine before the page is published.

Each tool page is reviewed against the same six input classes the engine is tested with — ASCII, emoji, combining marks, non-Latin scripts, empty input, and 5,000-grapheme input — and cannot become eligible if it is only a parameter variation of another page.

Automated evidence

  • Tool-contract & coverage suiteShared suite · 37 cases across all tools it covers

    tests/tools-30.test.mjs mirrors the ToolRunner dispatch and asserts every registered engineId returns the contracted output shape, plus a coverage guard: every style keeps one output character per input character with unmapped characters passed through in place, and strikethrough, zalgo and upside-down never drop or split a grapheme cluster.

    Run in: node --test after a production build (vinext build)
  • Rendered-HTML suiteShared suite · 26 cases across all tools it covers

    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 suiteShared suite · 38 cases across all tools it covers

    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