Text Tools

Text Sorter

Sort lines of text alphabetically, numerically, by length, in reverse, or shuffled — with case-insensitive, natural sort, duplicate removal, and blank line options — instantly, entirely inside your browser.

Private by default Instant results No signup
Text SorterLive
Overview

What is a text sorter?

A text sorter takes a list of lines — names, tasks, keywords, file names, prices, anything entered one item per line — and reorders them by a rule of your choosing: alphabetically, by length, numerically, in reverse, or even randomly shuffled. Instead of manually rearranging rows in a spreadsheet or writing a script for a one-off task, pasting the list here sorts it instantly.

It's useful for organizing a to-do list, alphabetizing a contact or reference list, ranking items by length for formatting, putting a numbered list in numeric order, or generating a randomized order for drawings, assignments, or A/B test groups.

Guide

How to use it

1Paste your list into the input box, one item per line
2Pick a sort order: A–Z, Z–A, length, numeric, reverse, or shuffle
3Toggle case sensitivity, natural sort, duplicates, or blank lines as needed
4Download the sorted result

How the sort options work

"A → Z" and "Z → A" sort lines alphabetically in ascending or descending order. "Shortest First" and "Longest First" order lines purely by character count. "Numeric" reads the leading number in each line and sorts by that value, which is useful for lists like prices or scores. "Reverse" simply flips the current order of the input, and "Shuffle" randomizes it. "Case-insensitive" ignores letter casing when comparing lines, and "Natural (numeric-aware) sort" makes alphabetical sorting treat embedded numbers as whole values — so "item2" sorts before "item10" instead of after it, the way a plain character-by-character sort would place it.

Why it helps

Features & benefits

Seven sort orders: A–Z, Z–A, length, numeric, reverse, shuffle
Case-insensitive and natural, numeric-aware comparison
Optionally remove duplicate or blank lines while sorting
Live line counts for input and output
Download the sorted list as a .txt file
100% private — nothing leaves the device

Why this runs entirely in your browser

Lists pasted here can contain names, prices, or other data you'd rather not upload anywhere. Every sort runs in JavaScript locally in the tab, which means it keeps working offline once the page has loaded and nothing typed or pasted into it persists after the tab is closed.

Common uses

Alphabetizing a list of names or references, ranking product titles by length for a layout, ordering a numbered list of scores or prices numerically, reversing a chronological log, or shuffling a list of entries for a random drawing or assignment order.

Frequently asked questions

A few things people usually want to know before trusting the numbers.

It makes alphabetical sorting treat numbers inside a line as whole values, so "item2" sorts before "item10" rather than after it, as a plain character sort would place it.

"Numeric" sorts entire lines purely by the leading number they contain, ignoring any surrounding text — useful for lists of prices or scores rather than mixed text and numbers.

Yes. Turn on "Remove duplicate lines" and it applies before sorting, so the output contains only unique lines in the chosen order.

It randomizes the order of the input lines using an unbiased shuffle, producing a new random order each time it's selected.

No. All sorting happens locally in your browser. Nothing typed or pasted here is sent to a server, stored, or shared.