Last updated ·Published ·By the WiserWork team

Text Sorter

Sort lines alphabetically, numerically, remove duplicates & randomize

Lines: 0 Duplicates: 0
Lines: 0
Copied to clipboard!

Twelve line operations for a list you paste in: alphabetical and numeric ordering, length ordering, shuffling, deduplication and trimming, with live counts of lines and duplicates.

What is the Text Sorter?

The Text Sorter treats every line as one item and reorders the whole set according to the rule you pick. Alphabetical ordering runs through the browser's localeCompare, which follows your locale's collation rules rather than raw code-point order, so accented letters land beside their base letters instead of after Z. The numeric, length, random and duplicate-removal modes each answer a different question about the same list.

Key Features

  • Twelve one-click operations covering alphabetical, numeric, length, random and duplicate handling
  • Case-insensitive and case-sensitive alphabetical modes in both directions
  • Live badges counting input lines, duplicate lines and output lines
  • Optional trim, empty-line removal and dedupe applied before every sort
  • Auto-sort checkbox that re-sorts alphabetically as you edit the input

Common Use Cases

  • Alphabetizing a bibliography, glossary or contributor list before pasting it into a document
  • Removing repeated addresses from an exported mailing list without opening a spreadsheet
  • Shuffling a list of names to draw an unbiased running order
  • Sorting log lines or exported keys by length to spot malformed entries

How to Use the Text Sorter

  1. Paste your list into the Input Text box, one item per line.
  2. Tick Remove empty lines, Remove duplicate lines or Trim whitespace to clean the list first.
  3. Click a button under Sort Options, such as A to Z or Numeric ascending.
  4. Compare the Lines and Duplicates badges against the line count shown on the output side.
  5. Press Copy to take the sorted output to your clipboard.

Tips for Best Results

  • Each button re-reads the input box, so operations do not stack; paste the output back to chain them.
  • Deduplication matches exact strings, so tick Trim whitespace first or a stray space will hide a duplicate.
  • Numeric sorting reads a leading number per line and treats lines without one as zero.
  • The plain alphabetical buttons ignore capitalization; use the Case versions when capitals should decide.

Why Use WiserWork's Text Sorter?

A spreadsheet can sort a column, but getting a plain list into and out of one costs more effort than the sort itself. This page skips that round trip, keeps the original list visible beside the result, and tells you how many duplicates were sitting in there before you decide to remove them. Nothing is uploaded, which matters when the list is email addresses or internal ticket titles.

Who Uses the Text Sorter?

Writers and researchers use it to alphabetize references and terminology lists. Developers and analysts pass in exported keys, IDs and log lines to dedupe or order them before a diff. Teachers and event organizers use the shuffle to produce a fair presentation order.

Frequently Asked Questions

Why do accented words sort next to their plain equivalents instead of at the end?

The alphabetical modes use the browser's localeCompare, which applies your locale's collation rules. Under those rules resume and resume with an accent are neighbors, whereas a raw code-point sort would push every accented form past Z.

What does the Case version of the alphabetical sort change?

The plain buttons lowercase both lines before comparing, so Apple and apple are treated as equal. The Case buttons compare the lines exactly as typed, which makes capitalization the deciding factor between otherwise identical entries.

How does numeric sorting handle lines that mix text and numbers?

It reads the leading number from each line, so a line beginning 12 apples sorts as 12. A line that does not start with a number is treated as zero and collects at the low end of an ascending sort.

Does Remove Duplicates ignore differences in capitalization?

No. It compares whole lines exactly, so Banana and banana are both kept. Lowercase the list beforehand if you need case-insensitive deduplication.

What is the difference between the Trim Lines button and the Trim whitespace checkbox?

They perform the same trimming, but the checkbox runs before every other operation while the button is a standalone action. Use the checkbox when you want trimming baked into each sort.

Is the Randomize option a real shuffle?

It runs a Fisher-Yates shuffle driven by Math.random, which is fine for drawing an order or mixing a practice list. It is not a cryptographic source, so avoid it where the outcome must be provably unbiased.

What does the Duplicates badge count?

It compares the number of non-empty input lines with the number of distinct ones, so it reports how many lines repeat something already present. The figure updates as you type.

Can I sort by the second word or by a column instead of the whole line?

No, every comparison starts at the beginning of the line. Reorder the fields yourself before pasting if a later column needs to drive the sort.

Why does the output line count differ from the input line count?

Empty-line removal and deduplication both drop lines, and both badges ignore blanks. A gap between the two numbers tells you how much the cleanup options actually removed.

Does the Reverse button sort anything?

No, it flips the line order of your input from top to bottom. Because every button starts again from the input box, you would need to paste a sorted list back in before reversing it.

A list is only useful once it is in an order somebody can scan, without the same entry appearing twice. These twelve operations handle that on lines you paste in, and the counts tell you exactly what changed.

Found this useful? Share it