Zero Signup ToolsFree browser tools

Text Tools

Text Sorter

Sort a list of lines alphabetically, naturally, numerically, by length, or randomly in your browser. Trim, dedupe, and library sort included.

Quick presets

0 lines, 0 chars

Sorted output

0 lines, 0 chars
Removed 0 blanks/trims

Sort options

Sort mode
Direction and locale
Pre-sort cleanup
Duplicate lines

How to use

  1. Paste your list into the input box, one item per line.
  2. Pick a sort mode: Alphabetical, Natural (file2 before file10), Numeric, Line length, Random shuffle, or Reverse order.
  3. Choose ascending or descending direction (ignored for Random and Reverse).
  4. Toggle pre-sort cleanup as needed: trim spaces, drop blanks, dedupe identical lines, ignore leading A/An/The for library sort.
  5. Pick a locale (English, German, French, Spanish, Turkish, Swedish, Japanese, Chinese) so accented and non-Latin characters compare correctly.
  6. Click Copy sorted text, or Replace with sorted to keep editing inside the input box.
  7. Use Shuffle again on Random mode to reroll the order without retyping.

About this tool

Text Sorter orders any list of lines, exactly the way you need. Alphabetical mode uses a locale-aware Intl.Collator so accented characters and non-Latin scripts (German, French, Spanish, Turkish, Swedish, Japanese, Chinese) compare the way native readers expect, with optional case-insensitive compare. Natural mode treats embedded numbers as numbers, so file2.txt sorts before file10.txt and chapter-2 before chapter-10 without renaming anything. Numeric mode parses each line as a number (signed, decimal, scientific notation, comma thousands separators) and sorts mathematically; lines that are not numbers are grouped together at the opposite end and sorted alphabetically among themselves so you can spot non-numeric data quickly. Length mode orders by character count with an alphabetical tie-break for stability, useful for finding the longest tweet, the longest URL, or trimming a column to a length budget. Random mode uses crypto.getRandomValues with rejection sampling and Fisher-Yates to produce a uniform unbiased shuffle (great for raffle order, randomized quiz questions, or fair team draws), with a Shuffle again button so you can reroll without retyping. Reverse mode flips the original line order without sorting, which is the fastest way to invert a list. Each mode pairs with ascending or descending direction, optional pre-sort cleanup (trim each line, drop blank lines, deduplicate identical or case-insensitive duplicates), and an optional library-sort toggle that ignores leading A, An, The so book and movie titles sort the way librarians do ("The Hobbit" sorts as "Hobbit"). The output panel shows the sorted lines, a per-run cleanup report (lines removed, duplicates removed), warnings when non-numeric lines are bucketed separately, and a Copy button so you can paste straight into a spreadsheet, code editor, or doc. Useful for writers and researchers alphabetizing references, marketers sorting keyword lists, developers sorting filenames or imports, teachers shuffling student names for fair pairings, librarians and book-club organizers ordering titles, spreadsheet users who need a quick sort without opening a spreadsheet, and anyone who pasted a messy list and wants it ordered cleanly. Input is capped at 200,000 characters or 100,000 lines so the page stays responsive on very large pastes, and the truncation is shown so you know exactly how much was processed. Everything runs locally on your device, so the lines you paste never leave your browser.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsText Tools