Example: putting Leeds postcodes in a sensible order
A courier firm plans delivery rounds from a list of customer postcodes. Sorted A to Z, LS10 lands between LS1 and LS2, because text sorting compares one character at a time and 1 comes before 2.
Natural order reads the numbers inside each line as numbers, so the districts run 1, 2, 10, 27 as a person would expect. Note that ls2 7EE, typed in lower case, sits next to LS2 7EE but is not removed as a duplicate, because duplicate removal only drops exact copies.
LS10 1AB LS2 7EE LS1 4AP ls2 7EE LS27 0BN
A to Z: LS1 4AP, LS10 1AB, LS2 7EE, ls2 7EE, LS27 0BN Natural: LS1 4AP, LS2 7EE, ls2 7EE, LS10 1AB, LS27 0BN
Sorting a list
Paste the lines
One item per line. Example buttons load names, numbers and postcodes.
Choose the order
Pick from the Order menu. The default is Natural (2 before 10), which suits most lists that contain numbers.
Set the extras
Case sensitive separates capitals from small letters when comparing. Remove duplicates drops lines that are exact copies. Remove empty lines is on by default.
Copy or download
Take the sorted list with the copy button or save it as sorted.txt.
Which order to use
| Order | Sorts by | Good for |
|---|---|---|
| A to Z / Z to A | Letters, ignoring capitals and accents unless case sensitive | Names, towns, company names |
| Natural (2 before 10) | Letters, with runs of digits compared as numbers | Postcodes, unit numbers, file names |
| Numeric | The first number found in each line | Quotes or prices with text around them |
| Shortest first / Longest first | Number of characters | Spotting truncated or overlong entries |
Questions people ask
How do I sort a list alphabetically?
Paste the list here and choose A to Z. Capitals and accents are ignored when comparing, so apple and Apple sit together and é sorts with e. Tick Case sensitive if you need capitals kept apart. The list itself is not changed, only its order.
What is natural sorting?
A way of sorting that treats numbers inside text as whole numbers. Plain alphabetical sorting puts Unit 10 before Unit 2, because it compares the character 1 with 2. Natural sorting puts Unit 2 first, which is how people read lists of units, postcodes and versions.
How does numeric sort handle prices?
It finds the first number in each line, ignoring commas used as thousand separators, and sorts by that. Quote £95 Harbour, Quote £480 Kestrel and Quote £1,250 Tidewell come out in that order. Lines with no number at all go to the end.
Where your data goes
Sorting is done by your browser's own text comparison rules, on your machine. The list is not sent to a server.
Checked against the tool on