Skip to content
ToolsFort home

Sort Text Lines Alphabetically

Sort text lines alphabetically A–Z or Z–A, naturally, numerically, by length or randomly, with optional de-duplication.

Updated

0 chars
0 chars

Alphabetise names, tidy keyword lists or shuffle items. Natural sort puts "item 2" before "item 10", just like a person would.

How to use the Sort Text Lines

  1. 1 Paste your list with one item per line.
  2. 2 Choose the sort order and options.
  3. 3 Copy the sorted list.

Worked examples

Natural sort

Input: file10 file2 file1

Result: file1 file2 file10

Numbers compared by value

Alphabetical vs. natural sort

Plain alphabetical sorting compares character by character, so "file10" comes before "file2". Natural sort compares embedded numbers by value, which is usually what you want for file names, versions and numbered items.

Locale-aware ordering

Sorting uses your browser's language rules, so accented letters (é, ü, ñ) are placed alongside their base letters instead of at the end.

Private by design

All processing happens in your browser. Your text is never uploaded, logged or stored on a server.

Frequently asked questions

How do I alphabetize a list?

Paste it, choose A → Z and copy the result.

Can I sort numbers correctly?

Choose "Numeric" to sort by the first number in each line, or "Natural" for mixed text and numbers.

Is the random shuffle truly random?

It uses an unbiased Fisher–Yates shuffle with your browser's random number generator.

Esc