search

Found

info Overview

Sort text lines A-Z or Z-A, reverse or shuffle them, and strip duplicate or empty lines with 6 one-click actions. Built for cleaning up lists fast.

📘 How to Use

  1. Paste your text into the input box with one item per line
  2. Click the action you need such as Sort A-Z, Reverse, or Shuffle
  3. Read the rearranged result in the output box

Text Line Sorter & Deduplicator

0
Actions
0
Copied!
Article

Text Line Sorter & Deduplicator | Clean Up Any List of Lines

Paste a block of text and sort it line by line A-Z or Z-A, reverse it, shuffle it randomly, or strip duplicate and empty lines. Six one-click actions handle the tedious list cleanup for you.

💡 About this tool

Anyone who keeps lists as plain text runs into the same chores: alphabetize a roster, dedupe an export of email addresses, randomize a pick list, or clean blank lines out of a copy-paste. Spinning up a spreadsheet or writing a quick script feels like overkill, but doing it by hand is error-prone. This tool sits right in that gap.

Sorting uses a locale-aware comparison (localeCompare) rather than raw code-point order, so it ignores case and produces a natural alphabetical order instead of dumping all capitals first. Deduplication compares whole lines for an exact match and keeps the first occurrence, preserving your original order. Shuffle uses the Fisher-Yates algorithm for an unbiased random permutation. Input and output sit side by side, so your source stays intact while you inspect the result.

🧐 Frequently Asked Questions

Does sorting care about uppercase vs lowercase? Sorting is case-insensitive (sensitivity: base), so apple and Apple land next to each other. Deduplication, however, is an exact match, so those two count as different lines.

Which copy survives deduplication? The first occurrence of a line is kept and every later duplicate is removed. The relative order of the surviving lines is unchanged.

How is leading and trailing whitespace treated? Sorting and dedupe compare the full line including spaces. Remove Empty Lines trims each line first, so lines containing only spaces are dropped too.

Will it sort numbers correctly? Lines are compared as text, so 10 sorts before 2. For true numeric order, pad your numbers with leading zeros before sorting.

Is there a line limit? Everything runs in your browser's memory with no hard cap, though tens of thousands of lines can start to feel sluggish during an operation.

📚 Why Sorting Order Surprises People

Early computers sorted strings purely by their numeric character codes. Because uppercase letters have lower code points than lowercase in ASCII, a naive sort puts Zebra before apple and groups punctuation in odd places. To match human expectations, modern systems use collation: language-specific rules that decide that a follows A, that accented letters belong near their base letter, and that symbols sort consistently. The Unicode Collation Algorithm formalizes this across scripts, which is why a locale-aware sort feels "right" while a byte sort feels broken.