Quick Work Studio logo Quick Work Studio

Text Tools

Sort Lines

Sort a list alphabetically A→Z or Z→A, or numerically from smallest to largest, ignoring upper/lower case.

About the Sort Lines

Sort Lines puts a list in order, A → Z or Z → A, by number, by length, in reverse, or shuffled at random. Options let you remove duplicates, drop blank lines, trim spaces, sort case-sensitively and number the result, all updating instantly.

What you can do with the Sort Lines

Alphabetical sorting that ignores capitals

A basic computer sort orders text by character codes, which puts every capitalized word before every lowercase one, so "Zebra" would come before "apple". This tool uses language-aware comparison instead, so "apple" and "Apple" sit together and accented letters are placed next to their plain versions.

Natural number order

Sorted as plain text, "item 10" comes before "item 2", because "1" is compared before "2". With "Natural numbers" on, numbers inside lines are compared by value, so file names, chapters and invoice numbers come out in the order people expect. The 1 → 9 and 9 → 1 orders sort purely by the first number in each line, including decimals and negatives.

More ways to order

"Shortest first" and "Longest first" sort by line length, "Reverse order" flips the list as it is, and "Shuffle" puts it in random order, handy for picking a running order or randomizing a quiz.

Related tools

Frequently Asked Questions

Can Sort Lines remove duplicates?

Yes. Switch on "Remove duplicates". It ignores capitals unless "Case-sensitive" is also on.

Why were my blank lines removed?

"Drop blank lines" is on by default. Switch it off to keep empty lines in the result.

Can I sort names by surname?

Not directly, each line is sorted from its first character. If your list is "First Last", rewrite it as "Last, First" before sorting.

Why does "item 10" come before "item 2" when I sort?

That is plain character order, where 1 comes before 2. Keep "Natural numbers (2 before 10)" switched on, which it is by default, and digits are read as whole numbers, so item 2 comes before item 10 as you would expect.

How do I rank students or scores from highest to lowest?

Put one entry per line, such as "Priya 92", and choose 9 → 1. Lines are sorted by the first number found in each line, so "Priya 92, Rahul 85, Amit 78" comes out in that order. Lines with no number go to the end.

What is the difference between Z → A and Reverse order?

Z → A sorts the lines alphabetically from Z to A. Reverse order does no sorting at all; it simply flips your list so the last line comes first, which is handy for turning an oldest-first log into newest-first.

What does the Case-sensitive option change?

By default capitals are ignored, so "apple" and "Apple" sort together and count as duplicates. With Case-sensitive on, upper and lowercase versions are treated as different lines, so both are kept when you remove duplicates and they sort as separate entries.

Can I shuffle a list to pick a random order?

Yes. Choose Shuffle and the lines are put in a random order, which is useful for presentation turns, quiz questions or a simple lucky draw. Each shuffle is random, so the order will differ from one run to the next.

How can I number the sorted list?

Switch on "Number the lines" and each line of the sorted result gets a running number, so you can paste a ready-made ranked or ordered list into a document or message without numbering it by hand.

Can I sort lines by length?

Yes. "Shortest first" and "Longest first" sort by the number of characters in each line. Lines of equal length are then sorted alphabetically, so the result stays predictable, which helps when tidying keyword lists or checking which titles are too long.

Can I sort a column copied from Excel?

Yes. Copy a single column and paste it in; each cell becomes one line. Sort it, then copy the result back into the sheet. If you copy several columns, each row is sorted as one line by whatever text it starts with.

Related tools

One studio. 96 tools.
Zero installs.

Browse by category
All tools
Guides & articles
CalculatorsHow Much Electricity Do Your AC, Geyser and Fans Really Use?Turn the watts on an appliance label into units and rupees, see which appliances actually drive your bill, and find the easy savings. CalculatorsWhich Pack Is Really Cheaper? How to Compare Unit PricesBigger packs aren't always better value. A simple way to compare price per kg, per litre or per piece, plus the shopping traps to watch for. CalculatorsHow to Calculate Your Exact Age "As On" a Date for Exam FormsRecruitment notices ask for your age as on a cut-off date. Here's how to count it correctly in years, months and days, and the cases that trip people up. Text ToolsHow Many Words Is That? Word and Character Limits ExplainedHow many words fit on a page, how long a speech takes, and the character limits for posts, meta descriptions and SMS, with tips for cutting to fit. CalculatorsSIP vs Lumpsum: Which Builds More Wealth?How monthly SIPs and one-time lumpsum investing really compare, when each one wins, and why most people should not agonise over the choice. CalculatorsUnderstanding Your Salary: CTC, Gross and In-HandWhy your offer letter number is bigger than what lands in your account, what CTC really includes, and how to compare job offers fairly.

All articles →

Every tool on Quick Work Studio, free and in your browser. Prefer reading first? See the guides or full directory.