πŸ“‘

Line Sorter & Deduplicator

Clean up any list in seconds β€” sort alphabetically or naturally, remove duplicates and empty lines, trim whitespace, shuffle, reverse, or number every line. Live statistics show exactly what changed.

πŸ“‘ 9 Line Operations πŸ“ˆ Live Statistics πŸ”’ Text Stays Local
0 lines

πŸ“‘ Perfect For

  • Email & mailing lists
  • Keyword lists for SEO/ads
  • Log file cleanup
  • Code imports & config lines
  • Inventory & product lists

πŸ’‘ Tips

  • Operations chain β€” sort, then dedupe
  • Natural sort orders file2 before file10
  • Undo reverses the last operation
  • Everything stays in your browser

The Unsung Workhorse: Why Line Operations Matter

An astonishing amount of practical data lives as plain lines of text: email lists exported from three different tools, keyword lists for ad campaigns, server hostnames, SKUs pasted from a spreadsheet column, import statements at the top of a code file, log excerpts. The chores are always the same β€” get them in order, get rid of the duplicates and blanks, clean the stray whitespace β€” and doing it by hand past twenty lines is both tedious and error-prone. Command-line users reach for sort | uniq; this page is that power without the terminal, plus a few operations Unix makes surprisingly awkward, with live statistics showing exactly how many lines each operation touched.

The Operations, and Their Sharp Edges

Sorting comes in two flavors for a reason. Alphabetical sort compares character by character, which puts file10 before file2 β€” correct by the rules, wrong by human expectation. Natural sort treats digit runs as numbers, ordering file2, file10, file100 the way a person would. Use natural sort for anything containing numbers: filenames, versions, addresses. The case-insensitive toggle controls whether Apple and apple sort together or ASCII-style (uppercase first).

Deduplication keeps the first occurrence of each line and preserves the remaining order β€” it does not require sorted input the way Unix uniq does, which is the number-one surprise for command-line veterans. With case-insensitivity on, john@example.com and John@Example.com count as the same entry β€” almost always what you want for email lists. Trim strips the leading and trailing spaces (and invisible tabs) that make two visually identical lines count as different β€” run it before deduplicating a list pasted from a spreadsheet, or hidden whitespace will keep "duplicates" alive. Shuffle uses a proper Fisher–Yates randomization, useful for sampling and randomizing question orders; reverse flips newest-first logs to oldest-first; number prefixes each line for referencing in documents.

Chaining Operations: The Standard Recipes

Real cleanups are sequences, and operations here apply to the current text, so they chain naturally. The classic list-merge recipe: paste all sources together β†’ Trim β†’ Remove Empty β†’ Remove Duplicates β†’ Sort A–Z β€” four clicks from three messy exports to one clean master list, with the statistics bar reporting how many duplicates died. For comparing two cleaned lists afterwards, our Text Diff tool shows what one has that the other lacks; for case normalization mid-cleanup, the Case Converter is one tab away, and a final Word Counter pass confirms the size of the result.

Frequently Asked Questions

Is my list uploaded anywhere?

No β€” every operation is local JavaScript. Customer email lists and internal data never leave your machine, which is precisely why a browser tool beats pasting your list into some server-side "list cleaner."

How large a list can it handle?

Hundreds of thousands of lines process in well under a second β€” sorting is the heaviest operation and modern browsers handle millions of comparisons without breaking a sweat. The textarea itself becomes the bottleneck long before the algorithms do.

Does deduplication keep the first or last copy?

The first, and the surviving lines keep their original relative order. If you want the list sorted too, dedupe first and sort after (or vice versa β€” the result is the same set).

Why do identical-looking lines survive deduplication?

Invisible differences: trailing spaces, tabs, or non-breaking spaces pasted from Word or web pages. Run Trim Whitespace first β€” it removes exactly these ghosts, after which true duplicates collapse.

Can I undo an operation?

Yes β€” Undo restores the text to the state before the last operation (one step). For multi-step experiments, copy your original somewhere safe first; the input box is editable at any time.

Does it handle Windows and Unix line endings?

Yes β€” input splits on both CRLF (Windows) and LF (Unix/Mac), so lists pasted from any source process correctly. Output uses standard newlines, which every editor and spreadsheet accepts; if a target system demands CRLF specifically, paste through Notepad on Windows.

Can I sort numbers correctly, like 5 before 40?

Use Natural Sort β€” it compares digit runs as numeric values, so 5, 40, 300 orders correctly where alphabetical sort would produce 300, 40, 5. This also fixes versions (v1.9 before v1.10) and numbered filenames.

Done!