Line Sorter & Deduplicator

Sort, deduplicate and clean up lists of text instantly. Your data never leaves your browser.

100% client-side

Input

0 lines

Output


        
—

What is Line Sorter & Deduplicator?

This tool cleans up any list of text pasted one item per line — email lists, log entries, IDs, URLs — by sorting them, removing duplicate or empty lines, and trimming stray whitespace. It's a faster alternative to writing a one-off script or spreadsheet formula every time you need to tidy up a plain-text list.

How to use Line Sorter & Deduplicator

  1. Paste your list into the Input panel, one item per line (or click Paste / Example).
  2. Choose a Sort order and a Remove duplicates mode from the dropdowns above.
  3. Toggle Remove empty lines, Trim whitespace, or Reverse final order as needed.
  4. Read the cleaned list in the Output panel, and click Copy or Download to grab it.

How line sorting & deduplication works

Paste any list of lines — IDs, URLs, emails, log entries — and this tool applies your chosen options in a fixed order: trim whitespace, remove empty lines, remove duplicates, sort, then (optionally) reverse. For example, starting from this messy input:

// Before
banana
apple
Cherry
banana
Mango
Ada
ada

grape

// After (Sort: A → Z, Dedupe: case-insensitive, Remove empty: on, Trim: on)
Ada
apple
banana
Cherry
grape
Mango

Notice "banana" (an exact duplicate) and "ada" (a case-variant duplicate of "Ada") are each removed down to one occurrence, the blank line is gone, and "Mango"'s trailing spaces are trimmed before deduplication and sorting run — otherwise "Mango " and "Mango" would have been treated as different lines. Everything runs with native JavaScript in your browser; no data is uploaded anywhere.

Frequently asked questions

Is it safe to paste sensitive data into this tool?

Yes. All processing happens in your browser using native JavaScript; no data is ever sent to a server.

How does "Numeric" sort handle lines that aren't numbers?

Lines that start with a number are compared by that numeric value, so "2" correctly sorts before "10". Lines that don't start with a number can't be compared numerically, so they're placed after all numeric lines and sorted alphabetically among themselves.

What's the difference between case-sensitive and case-insensitive duplicate removal?

Case-sensitive treats "Foo" and "foo" as different lines. Case-insensitive treats them as duplicates and keeps only the first one it sees. It's an explicit three-way choice (off / case-sensitive / case-insensitive) so you always know which behavior you're getting.

Does it handle very large lists?

Yes. Deduplication uses a Set for O(n) lookups instead of comparing every line against every other line, so lists with several thousand lines still process instantly.