Line Tools

Paste a list and sort it, remove duplicates, strip blank lines, trim whitespace, number the lines, reverse the order or shuffle it. Operations apply in a fixed, predictable order, and a few details are handled the way you would actually want. Natural sort reads embedded numbers as numbers, so item2 comes before item10 — plain alphabetical sorting gets that backwards, which is technically correct and practically useless for anything numbered. Deduplication keeps the first occurrence and the original order unless you also sort, rather than quietly rearranging your list. Line numbers are padded so a hundred-line list stays aligned instead of stepping right at line ten. And the shuffle takes a seed, so the same seed gives the same order — worth having when you need to reproduce or share a shuffle.

Sorting the same list three ways

Modeitem10, item2, item1
Alphabeticalitem1, item10, item2
Naturalitem1, item2, item10
Lengthitem1, item2, item10
Reverse orderitem1, item2, item10 (input order flipped)
NumericSorts by a leading number, not an embedded one

When to use it

  1. Sort a list of names, domains or IDs.
  2. Remove duplicate entries from an exported list.
  3. Number a list for a numbered document or checklist.
  4. Sort filenames with numbers in them, in the right order.
  5. Randomise a list reproducibly, from a seed.

How to Use

  1. Paste your lines.
  2. Pick a sort, and toggle deduplication, trimming or numbering.
  3. Copy the result.

Features

  1. Alphabetical, reverse, case-insensitive, natural, numeric and length sorting
  2. Natural sort so item2 precedes item10
  3. Duplicate removal keeping first-seen order
  4. Blank line removal and per-line trimming
  5. Line numbering with aligned padding
  6. Reproducible seeded shuffle
  7. Grapheme-accurate character counts
  8. 100% client-side

FAQs

Is my text uploaded?

No. Everything happens in your browser.

What is natural sort and when do I need it?

It reads numbers inside the text as numbers, so item2 sorts before item10. Alphabetical sorting compares character by character, reaches 1 against 2, and puts item10 first. Use natural sort for anything numbered — files, versions, chapters.

Does removing duplicates reorder my list?

No. The first occurrence of each line is kept in its original position. The order only changes if you also choose a sort.

In what order are the operations applied?

Trim, then remove blanks, then deduplicate, then sort, then number. That order matters — trimming first means a line of spaces counts as blank, and numbering last means the numbers reflect the final list.

What does numeric sort do with lines that have no number?

Puts them after the numeric ones, sorted among themselves. Letting a comparator return NaN scatters them unpredictably, which is what happens in most naive implementations.

Why does the shuffle have a seed?

So it can be repeated. The same seed always produces the same order, which means you can share a seed and get the same result, or re-run one. An unseeded shuffle is impossible to reproduce.

Technical Details

Operations apply in a fixed order — trim, remove blanks, deduplicate, sort, number — because the order changes the answer and an arbitrary one produces results people cannot predict. Trimming runs before blank removal so a line of spaces counts as blank, which is almost always what is meant. Deduplication uses a Set, which preserves first-seen order, so removing duplicates without also sorting leaves the text in its original sequence rather than silently reordering it. Numbering runs last and pads the numbers to a common width, so a hundred-line list stays aligned instead of stepping right at line ten. The sorting modes are where the detail is. Natural sort uses a numeric-aware collator, so item2 comes before item10 — plain alphabetical comparison reaches the second character, compares 1 against 2, and puts item10 first, which is correct alphabetically and wrong for anything a person numbered. Numeric sort reads a leading number from each line and places lines with no number after the ones that have one, rather than letting NaN comparisons scatter them unpredictably, which is what happens when a comparator returns NaN. Case-insensitive sort lowercases only for comparison and leaves the text as written. Shuffling uses a seeded generator, so the same seed reproduces the same order — useful when a shuffle needs to be repeated or shared, and impossible with Math.random. Character counts are by grapheme, so an emoji counts as one character rather than four. Everything runs in your browser.

Text Utilities

Text Utilities

  • Find and Replace
  • Markdown to PDF
  • Markdown to Word
  • Text to Speech
  • Online Notepad
  • Morse Code Translator
  • Readability Checker
  • Text Summarizer