MockFoxAdvertise

Sort Lines Alphabetically

Updated Free mock REST & WebSocket APIs

Paste a list to put it in alphabetical order instantly. You can also sort numerically, use natural sort so file2 comes before file10, sort by length, reverse the order or shuffle, and remove duplicates and empty lines at the same time.

Result

🔒 Runs in your browser — nothing you paste is uploaded.

How to sort lines

  1. Paste your list with one item per line.
  2. Choose how to sort: A → Z, Natural, Numeric, Length, Reverse order or Shuffle. Tick Descending for Z → A.
  3. Copy or download the sorted list.

Which sort order should I use?

SortResult for file1, file10, file2Best for
A → Zfile1, file10, file2Names, words, titles
Naturalfile1, file2, file10File names, versions, chapters
Numericby the first number in each linePrices, scores, “12 apples”
Lengthshortest firstKeywords, tidy code imports

Alphabetical sorting uses your browser's language-aware collation, so accented letters sort next to their base letter (é with e) rather than after z. By default case is ignored. With Case-sensitive on, uppercase comes before lowercase for otherwise equal lines. Ignore “the”, “a”, “an” sorts “The Beatles” under B, as libraries and music apps do. Shuffle uses an unbiased Fisher–Yates shuffle.

Related tools

Embed this tool on your site

Browse all embeddable tools →

Free for blogs, HR, payroll and contractor sites: copy one snippet — the widget sizes itself and matches your colors.

Get the embed code

Frequently asked questions

Is my list uploaded anywhere?

No. Everything runs in your browser, so your list never leaves your device. Nothing is logged or stored on a server.

How do I sort in reverse alphabetical order (Z to A)?

Choose A → Z and tick Descending. 'Reverse order' is different: it flips the list as it is, without sorting.

Why does file10 come before file2?

Plain alphabetical sorting compares character by character, and '1' comes before '2'. Choose Natural to compare the numbers inside each line by value.

What happens to lines without a number in numeric sort?

They go to the end, in their original order. Numbers with thousands separators like 1,200 and negative numbers are understood.

Your business here? Sponsor this tool from $16/week. See placements