Tool Hub

Sort & Dedupe

Sort lines (A-Z, length, numeric) and remove duplicates, with trim and case options

Process line-based text: sort alphabetically, by length, or numerically; remove duplicates; trim whitespace; and skip empty lines. Output updates instantly as you change options.

Input: 6 lines · Output: 4 lines

Output

How to use

  1. Paste a list of lines into the input area — one item per line.
  2. Choose a sort order: alphabetical, reverse alphabetical, by line length, or numeric.
  3. Toggle deduplication to remove duplicate lines, with optional case-sensitive matching.
  4. Enable trim and remove-empty-lines options to clean up whitespace.
  5. Copy the output or use the copy-link button to share the state — everything runs in your browser.

Examples

  • Pasting 10 country names with 3 duplicates, enabling sort A→Z and dedupe, reduces the list to 7 unique names in alphabetical order.
  • Pasting a mixed list of numbers like "10\n2\n20\n1" and choosing numeric sort produces "1\n2\n10\n20" instead of lexicographic order.

Verify outputs before using in production. No warranty — see Terms.