Favorite places of your favorite city
Home
Add to preferred sources on Google

Remove Duplicate Lines

Keep the first occurrence of each exact line in a pasted list, without sorting or trimming its content. Spaces, case and blank rows remain meaningful. Every retained output line uses an LF ending, including the last.

Keep the first exact occurrence of each line, in order. Spaces, case and blank lines matter; every retained line ends with LF.

Original lines

Maximum 100,000 raw and canonical UTF-16 units (including the final LF); 10,000 input lines.

Result

No result yet

The draft and result are processed locally; this tool does not upload or save them. Ordinary site requests still occur.

Clean a pasted line list

  1. Paste or type the list into Original lines. Empty input is valid. Use example fills pear, apple, a repeated pear and a blank row, then waits for you to select Remove duplicates.
  2. Select Remove duplicates. The tool checks raw and canonical text against 100000 UTF-16 units and checks all input records against 10000 lines before removing any repeats. The canonical limit includes the final LF needed to terminate the last line.
  3. Read lines kept, input lines and duplicate lines removed, then inspect the readonly result. Copy result uses the current logical text; clipboard failure selects it for manual copying. Download TXT produces a UTF-8 file named unique-lines.txt. Clear removes the draft and result.

Understand exact matching and output format

Matching compares complete line contents after CRLF and standalone CR endings become LF. It keeps the first occurrence and preserves order. It does not trim spaces, fold case, normalize Unicode, sort or interpret CSV quoting and columns.

Blank content participates like any other line and survives once. A blank line, a line containing one space and a line containing a tab are three distinct contents. The text a and a followed by LF have the same content for this operation.

The result emits one LF after every retained line. This preserves a retained blank row at the end and makes a second pass return the same text with zero removals. Even when no duplicates are removed, the output can normalize endings or add the final LF; it is not a byte-identity check.

Removed lines count surplus occurrences after the first, not duplicate groups. Three copies of a become one copy, with two removals. The input total always equals lines kept plus lines removed, and similar-looking Unicode sequences can remain distinct.

Examples of order, blanks and significant text

Pear, apple, pear and a blank row produce pear, apple and the blank row: four input lines, three kept and one removed. Order follows the first occurrences, not alphabetical order.

The text a, a blank row and another a without a final newline produces a followed by two LFs. One LF ends the a record and the other preserves the retained blank record. Preserving the source's missing final LF would lose that row.

A, a and A keep both A and a, with one removal. A line containing a, a line with a leading space and a line with a trailing space also remain distinct. Empty text has zero records; one LF has one blank record.

Admission limits and exact text

Both raw text and normalized, fully LF-terminated input must fit 100000 UTF-16 units; at most 10000 input records are allowed before deduplication. A 100000-unit draft without its final terminator would need 100001 canonical units and is rejected, not shortened. These units are not bytes or visible characters.

Malformed UTF-16 is rejected rather than silently repaired. Valid supplementary characters and actual replacement characters remain content. Browser text fields already normalize line endings, so the original clipboard or source-file bytes cannot be recovered.

This version accepts pasted plain text, not uploaded files. It has no trim, case-insensitive, sort, selected-column or blank-line-removal options. Downloads use UTF-8 and LF without an added BOM, while clipboard newline conventions can vary by operating system or destination application.

Local list processing

The tool processes the draft locally and does not upload it, put it in URLs or analytics, or save it in browser storage. Ordinary site and asset requests still occur. Input and result are rendered as text, not executed as HTML or code; there is no saved list or share link.

Duplicate-line questions

The first exact occurrence is kept and later copies are removed. Surviving lines stay in their original relative order. This is not a mode that retains only lines appearing once.

No. Leading and trailing spaces, tabs and case are significant. Empty-content rows are duplicates of each other and survive once, but a whitespace-only row is distinct from an empty one.

The output always uses LF after each retained record. It can normalize CRLF or CR and add a missing final LF even when every content is distinct.

The 100000-unit canonical cap reserves its required final LF before deduplication. A draft already using all 100000 units without that terminator needs one more. This keeps every accepted output valid for a second pass.

Yes, within the same well-formed UTF-16 and size limits. Exact content is compared without a Latin-word tokenizer or Unicode normalization. Similar-looking but different sequences remain distinct.

Copy uses the current logical result, including blank rows; platform clipboard endings can vary. Download TXT has exact UTF-8 bytes and LF endings, with no extra BOM. A U+FEFF already present in your content is preserved rather than stripped.

Sources

References for exact matching and browser text/export behavior.

Reviewed 5 November 2026; this is not professional or safety approval.

JSON to YAML

Convert JSON to YAML locally while preserving number text and quoted strings; copy or download the complete result.

Open tool — JSON to YAML

YAML to JSON

Convert one YAML document locally to JSON with exact number text and bounded aliases, then copy or download the complete result.

Open tool — YAML to JSON

HTML to Markdown

Convert pasted or local HTML into Markdown, review conversion notes, and copy or download the result.

Open tool — HTML to Markdown

JavaScript Regex Tester

Test a JavaScript pattern locally and inspect matches, captures, and UTF-16 positions.

Open tool — JavaScript Regex Tester

Markdown to HTML

Convert a Markdown draft to an HTML fragment, inspect the source and inert preview, then copy or download it.

Open tool — Markdown to HTML

Text Sorter

Sort lines alphabetically by a chosen language or by Unicode code point, keeping duplicates, blank rows and complete line contents.

Open tool — Text Sorter

Text Diff Checker

Compare two drafts locally, with exact whole-line changes, visible whitespace rules and clear final-newline handling.

Open tool — Text Diff Checker

Case Converter

Convert text to uppercase, lowercase, capitalized words or sentence case with explicit letter rules.

Open tool — Case Converter

HTML Entity Encoder/Decoder

Encode or decode literal HTML references with explicit context, Unicode options and LF output, without parsing or rendering markup.

Open tool — HTML Entity Encoder/Decoder

Markdown Table Generator

Edit a small literal-text table, set alignment and copy GFM Markdown or import tab-separated text.

Open tool — Markdown Table Generator

Query String Parser & Builder

Edit ordered URL parameters, retain repeated names and copy a normalized query or HTTP(S) URL.

Open tool — Query String Parser & Builder

URL Encoder & Decoder

Convert a UTF-8 URL component or form value with explicit space and plus rules, then copy or download the result.

Open tool — URL Encoder & Decoder

Base64 Encoder & Decoder

Encode UTF-8 text as standard or URL-safe Base64, or decode either format with clear errors and complete text output.

Open tool — Base64 Encoder & Decoder

XML Formatter

Check namespace-aware XML 1.0, format or compact locally, and copy or download UTF-8 output.

Open tool — XML Formatter

JSON Formatter & Validator

Check JSON syntax, format or minify locally, and copy or download output while preserving original data tokens.

Open tool — JSON Formatter & Validator

SMS Character Counter & Segment Calculator

See how your message is encoded, where its segments end and what it may cost. Your text stays in your browser.

Open tool — SMS Character Counter & Segment Calculator

Social Media Character Counter

Check platform-specific limits and split posts without losing text.

Open tool — Social Media Character Counter

Character Counter

Count characters, words, sentences and paragraphs. Check word density, reading time and UTF-8 size, all in your browser.

Open tool — Character Counter

Text Size Calculator

Compare text encodings and payload sizes in your browser.

Open tool — Text Size Calculator

PDF Text Cleaner

Fix line breaks and spacing in text copied from a PDF. Preserve your original and review ambiguous hyphens before copying the cleaned text.

Open tool — PDF Text Cleaner

Fancy Text Converter

Convert supported fancy Unicode letters to normal text locally. Keep case, accents, emoji and your original text.

Open tool — Fancy Text Converter

Garbled Text Fixer

Fix garbled text and repair broken accents with a browser-based mojibake fixer. Review each possible UTF-8 reversal before applying it.

Open tool — Garbled Text Fixer

Gmail Clipping Checker

Measure email HTML bytes in UTF-8, compare them with an advisory 102,000-byte Gmail reference, and inspect size contributors locally.

Open tool — Gmail Clipping Checker
View all tools in this category