Hack the Hydra

Remove duplicate lines

Paste a list and clean it in one step: drop repeated lines, remove blank lines, trim spaces and sort alphabetically or by number. The first occurrence of each line is kept, in its original order unless you sort.

🔒 Private by design: the conversion runs in this browser tab. Nothing is uploaded.

Remove duplicate lines is a free online tool by Hack the Hydra. Remove duplicate lines, delete blank lines, trim spaces and sort a list A-Z, Z-A or numerically. Case-insensitive option. Private, runs in your browser.

100% freeNo upload: runs in your browserNo sign-up
Remove duplicate lines: the tool with a sample file converted

Typical uses

Cleaning an email or keyword list copied from several sources, de-duplicating URLs before a crawl, tidying a list of SKUs, or sorting names. Everything happens line by line, so the tool works for any plain-text list, CSV column or log excerpt.

Which duplicate is kept

The first occurrence stays and later copies are removed, so your original order is preserved unless you pick a sort. With "Ignore upper/lower case" on, "Apple" and "apple" count as the same line and the first spelling is kept. Trim spaces first if lines differ only by leading or trailing spaces, which is the usual cause of duplicates that will not go away.

Sorting rules

A to Z uses natural ordering, so "item2" comes before "item10". Numeric sort reads the number at the start of each line; lines without a number count as 0.

Example

A list with repeated lines, with duplicate removal turned on. The first occurrence is kept, order unchanged.

Input

apple
banana
apple
cherry
banana

Output

apple
banana
cherry

How to use

  1. Type or paste your text in the box above.
  2. The result updates as you type; change the options to switch mode.
  3. Copy the result or download it.

FAQ

Does it upload my list?

No. Lines are processed in your browser, which makes it safe for customer lists and other private data.

How many lines can it handle?

Hundreds of thousands of lines are fine on a modern computer. Very large pastes can make the tab slower.

Can I only sort, without removing duplicates?

Yes. Untick "Remove duplicate lines" and choose a sort order.

Why are two identical-looking lines not merged?

They probably differ by an invisible trailing space or by case. Tick "Trim spaces" and "Ignore upper/lower case".

More free converters

PDF to Markdown converterOCR PDF: scanned PDF to textImage to text (OCR)Word (DOCX) to Markdown converterExcel & CSV to Markdown tablesHTML to Markdown converterPowerPoint (PPTX) to Markdown converterJSON to Markdown tablePDF to text converterExcel to JSON converterMarkdown to HTML converterMerge PDF filesSplit PDF: extract pagesRotate PDFJPG to PDF converterPDF to JPG converterImage converter: PNG, JPG, WebPCompress image: JPG and WebPQR code generatorWord counterCase converterJSON formatter and validatorBase64 encode and decodeURL encoder and decoderUUID v4 generatorStrong password generatorLorem ipsum generatorJSON to CSV converterUnix timestamp converterJSON to YAML converterText diff checkerImage resizerPercentage calculatorAge calculatorHash generator (SHA-256, SHA-1, SHA-512)Color converter: HEX, RGB, HSLDays between dates calculatorYAML to JSON converterUnit converterJWT decoderBinary, hex, decimal and octal converterRoman numeral converterRegex testerCron expression explainerPDF to Markdown for ChatGPTPDF to Markdown for ClaudePDF to Markdown for RAG pipelinesPDF to Markdown for ObsidianPDF to Notion (via Markdown)Screenshot to textFrench OCR: image to textCSV to Markdown tableGoogle Docs to MarkdownJPG / JPEG to text (OCR)PNG to text (OCR)CSV to JSON converterPNG to JPG converterJPG to PNG converterWebP to PNG converter