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.
Clean a pasted line list
- 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.
- 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.
- 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
Sources
References for exact matching and browser text/export behavior.
- tc39.esECMAScript stringsStrings preserve exact code-unit sequences for comparison.
- tc39.esECMAScript SetSet membership compares exact string values.
- html.spec.whatwg.orgHTML textareaText fields normalize line endings in their API values.
- encoding.spec.whatwg.orgUTF-8 encodingDefines the encoding used for the downloaded file.
- w3c.github.ioFile API: BlobDescribes binary data used for the download.
- w3.orgClipboard APIClipboard formats and line endings can vary across platforms.
Reviewed 5 November 2026; this is not professional or safety approval.
Related tools
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 YAMLYAML 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 JSONHTML to Markdown
Convert pasted or local HTML into Markdown, review conversion notes, and copy or download the result.
Open tool — HTML to MarkdownJavaScript Regex Tester
Test a JavaScript pattern locally and inspect matches, captures, and UTF-16 positions.
Open tool — JavaScript Regex TesterMarkdown 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 HTMLText Sorter
Sort lines alphabetically by a chosen language or by Unicode code point, keeping duplicates, blank rows and complete line contents.
Open tool — Text SorterText Diff Checker
Compare two drafts locally, with exact whole-line changes, visible whitespace rules and clear final-newline handling.
Open tool — Text Diff CheckerCase Converter
Convert text to uppercase, lowercase, capitalized words or sentence case with explicit letter rules.
Open tool — Case ConverterHTML 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/DecoderMarkdown Table Generator
Edit a small literal-text table, set alignment and copy GFM Markdown or import tab-separated text.
Open tool — Markdown Table GeneratorQuery String Parser & Builder
Edit ordered URL parameters, retain repeated names and copy a normalized query or HTTP(S) URL.
Open tool — Query String Parser & BuilderURL 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 & DecoderBase64 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 & DecoderXML Formatter
Check namespace-aware XML 1.0, format or compact locally, and copy or download UTF-8 output.
Open tool — XML FormatterJSON Formatter & Validator
Check JSON syntax, format or minify locally, and copy or download output while preserving original data tokens.
Open tool — JSON Formatter & ValidatorSMS 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 CalculatorSocial Media Character Counter
Check platform-specific limits and split posts without losing text.
Open tool — Social Media Character CounterCharacter Counter
Count characters, words, sentences and paragraphs. Check word density, reading time and UTF-8 size, all in your browser.
Open tool — Character CounterText Size Calculator
Compare text encodings and payload sizes in your browser.
Open tool — Text Size CalculatorPDF 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 CleanerFancy Text Converter
Convert supported fancy Unicode letters to normal text locally. Keep case, accents, emoji and your original text.
Open tool — Fancy Text ConverterGarbled 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 FixerGmail 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