WORDCOUNTERS
ToolText Sorter
Sort mode
Options
100% in your browser · no upload

0 lines sorted0 lines in0 removed

Text Sorter

Text Sorter

8 sort modes, live preview · Numeric + length sort included · Runs in your browser · no upload

What a text sorter does (and which mode to pick)

Sort any list of lines alphabetically, by line length, by leading number, or in reverse. Plus a fair Fisher-Yates shuffle when you want randomness. Filters before the sort: trim whitespace, remove blank lines, remove duplicates, case-insensitive compare. Everything runs in your browser; your text never leaves your device. Free, private, no sign-up.

A text sorter operates on lines: each line is one item, the sort compares items, and the output is the same set of lines in a new order. The right mode depends on what the lines represent. Names, terms, and word lists go alphabetical. Numbered items go numerical (so 10 lands after 2, not before it). Replies or notes you want ranked by brevity go by line length. Drawings and samples go shuffle. The options on top of that (case-insensitive, trim, remove blank, remove duplicates) are filters applied before the sort, so the comparison sees the final shape of each item.

  • 8 sort modes: alphabetical both directions, length both directions, numerical both directions, reverse, and shuffle
  • Locale-aware alphabetical comparison handles accented and non-Latin letters
  • Numerical sort parses the leading number on each line (handles negatives and decimals)
  • Options run BEFORE the sort: trim, remove blanks, remove duplicates, case-insensitive
  • Pair with the duplicate remover for one-pass list cleanup
Quick answer

Alphabetical handles most lists. Reach for numerical the instant any line starts with a number. Reach for length when the goal is editing for brevity. Reach for shuffle when you want fairness, not ordering.

Sort mode cheat sheet

Each of the 8 modes paired with a tiny worked example and the situation it's the right pick for. Pick the row that matches your input and select the matching mode in the tool.

ModeExample outputWhen to use it
A → Zapple, banana, cherryThe default for any name, term, or word list. Alphabetical ascending using locale-aware comparison (so accented and non-Latin letters sort correctly).
Z → Acherry, banana, appleSame comparison, reversed. Useful when the newest item or the last alphabetical entry is what you want at the top.
Short → Longant, bear, hippoSorts by character count. Lets you spot one-line abbreviations or empty rows, and is the right pick for ranking responses by brevity.
Long → Shorthippo, bear, antSame length comparison, reversed. Surfaces the most verbose lines for editing.
1 → 91. cherry, 2. banana, 10. appleNumerical ascending, parsing the leading number on each line. Beats lexical sort, which would put 10 before 2. Negative numbers and decimals are handled correctly.
9 → 110. apple, 2. banana, 1. cherryNumerical descending. Same parsing rules; useful for rankings, scores, sales figures.
Reverse(flip the current order)Doesn't compare anything: just flips the current line order. Pair with another sort if you want descending by something the modes don't cover directly.
Shuffle(random order)Fisher-Yates shuffle backed by Math.random. The only non-deterministic mode: re-clicking gives a fresh order. Useful for randomizing draws, picking samples, or A/B test seeding.

Built for sorting any list, fast

Three angles on the job: how the comparison works, how the filters work, and how to pair the sorter with the rest of the suite.

Mint

Comparison rules

  • Locale-aware alphabetical (Unicode-safe)
  • Numerical parses the leading number
  • Length uses character count
  • Shuffle uses an unbiased Fisher-Yates
Sky

Filters before sort

  • Case-insensitive: Apple and apple match
  • Trim: leading and trailing spaces dropped
  • Remove blanks: empty rows stripped
  • Remove duplicates: one of each survives
Pink

Pair with the suite

How to use the text sorter

Three steps. No sign-up, no setup, nothing to install.

  1. 1

    Paste your list

    One item per line. Spreadsheet columns, line-separated exports, and copy-pasted lists all work the same.

  2. 2

    Pick a mode + toggles

    Pick alphabetical for words, numerical for numbers, length for editing for brevity, shuffle for randomness. Flip on the relevant filters (trim and remove blanks are almost always worth turning on).

  3. 3

    Copy the result

    Read the stat line (X lines sorted), then hit Copy. Use Clear to start a new run.

Who built this

Same team behind the Word Counter, Character Counter, Sentence Counter, Case Converter, Remove Duplicates, and Lorem Ipsum Generator. Every tool on this site runs entirely in your browser.

The WordCounters team

Linguists, editors & engineers

A small team of writers and engineers shipping privacy-first text tools. Sorting uses the browser's native locale-aware string comparison plus a small parsing layer for numerical mode; shuffle uses an unbiased Fisher-Yates permutation backed by Math.random.

Method documentedUpdated May 2026Privacy-firstFree · v1.0

Frequently asked

Direct answers; mirrored in this page's FAQ JSON-LD so AI answer engines can cite them cleanly.

What does a text sorter do?
It rearranges the lines of your input into a new order. Each line is one item; the sort compares items and emits the same set of lines, reordered. This tool offers eight modes: alphabetical (A to Z and Z to A), by line length (short to long and long to short), numerical (parsing the leading number on each line, both directions), reverse (just flip the current order), and shuffle (fair Fisher-Yates randomization). Four filters apply before the sort: trim, remove blank lines, remove duplicates, and case-insensitive compare.
How do I alphabetize a list?
Paste one item per line and pick "A to Z". The comparison is locale-aware, so accented letters and non-Latin scripts sort the way users expect rather than by raw Unicode code-point. Turn on "Case-insensitive" if your list mixes capitalized and lowercase variants (Apple and apple should land next to each other instead of split between two halves of the output).
Why doesn't a plain alphabetical sort work for numbered lists?
A plain alphabetical sort is lexical: it compares strings character by character. "10" comes before "2" because the character '1' comes before '2'. For numbered lists you need a numerical sort, which parses the leading number on each line and compares the numbers as numbers. This tool's numerical mode does that: "1. apples, 2. bananas, 10. cherries" stays in 1, 2, 10 order, not 1, 10, 2.
What does the trim option do?
Trim strips leading and trailing whitespace from every line before sorting. Turn it on when your input was pasted from a spreadsheet or scraped from a page that left stray spaces at the start or end of some lines. Without trim, the sort sees "foo" and " foo" (with a leading space) as different lines, which is almost never what you want.
Is the shuffle mode actually random?
It's an unbiased Fisher-Yates shuffle backed by the browser's Math.random. Every input ordering has equal probability of producing every output ordering. For statistical randomness and games it's plenty good; for cryptographic purposes (drawing a winner where money is on the line) you'd want crypto.getRandomValues, which this tool doesn't use because it isn't designed for that bar.
Is my text uploaded anywhere?
No. The sorter runs entirely in your browser. We don't upload, log, or send a single character to any server. Your text is held in your browser's per-tab session storage so a refresh doesn't lose your work, and it clears the moment you close the tab. The page itself is static HTML; the sorter is a small client-side script. Closing the tab is the only privacy guarantee you ever need.

Try the rest of the tools

Same brutalist console, same privacy promise. Pick a tool: