Sort Lines Alphabetically
Alphabetize a list line by line — A to Z or Z to A — without changing the text of any line.
Sort Lines Alphabetically works on your text locally in your browser.
Put any list in alphabetical order
Names, keywords, glossary terms, product lists, and bibliography entries are easier to scan and check when they are in order. Paste one item per line and the list is sorted instantly using English alphabetical rules. Capital and small letters sort together, blank lines move to the end, and every line keeps its original text.
How to sort lines alphabetically
- Type or paste your text, or choose Upload Document to open a .txt, .md, .docx, or .pdf file.
- The result appears immediately below; change the order or options at any time.
- Choose Copy Result to use it elsewhere, or Replace Input with Result to keep working here — Undo Replace brings the original back.
How lines are compared
- Lines are compared alphabetically using English collation rules, so “apple” and “Apple” sort together and accented letters sit next to their base letters.
- Punctuation and digits sort before letters.
- “Capitals first” puts “Apple” before “apple” when the lines are otherwise identical.
- “Sort numbers by value” compares numbers as numbers, so “item 2” comes before “item 10”.
- Lines that compare as equal keep their original order, and blank lines always go to the end.
| You enter | You get |
|---|---|
| banana Apple cherry apple | Apple apple banana cherry |
| item 10 item 2 item 1 | item 1 item 10 item 2 |
Your text stays on your device
- Text is processed by JavaScript running in your browser.
- Your text is never uploaded to Looty Tools or any other server.
- Uploaded documents are opened and read in your browser; the file itself is never sent to Looty Tools.
- Nothing is stored — refreshing or closing the page clears both boxes.
Limitations
- Uploads accept .txt and .md files up to 5 MB, Word .docx files up to 15 MB, and PDFs up to 25 MB and 50 pages. Older .doc files are not supported, and scanned or image-only PDFs have no text to use.
- Sorting follows English alphabetical rules; other languages order some letters differently.
- Leading words such as “The” or “A” are not ignored, so “The Hobbit” sorts under T.
- Names are sorted by the first word on the line; put surnames first if you need to sort by them.
Related text tools
- Case ConverterSwitch text between upper, lower, title, and sentence case.
- Remove Duplicate LinesDelete repeated lines and keep one copy of each.
- Remove Empty LinesDelete blank lines from a list or block of text.
Guides
- How Alphabetical Sorting WorksWhy computers can sort “Zebra” before “apple”, how language-aware collation handles case and accents, and how alphabetical order differs between languages.
- Natural Sort OrderWhy alphabetical sorting puts “10” before “2”, how natural number-aware sorting works, and the zero-padding workaround for tools that sort as text.
- Alphabetizing Names and TitlesHow to sort people by surname, file titles without “The”, and choose between word-by-word and letter-by-letter order before sorting a list.
Sort Lines Alphabetically FAQ
- Is the sorting case-sensitive?
- By default no — “apple” and “Apple” sort together. Turn on “Capitals first” to put capitalized lines before lowercase ones when they are otherwise the same.
- Why does “item 10” come before “item 2”?
- By default text is compared character by character, and “1” comes before “2”. Turn on “Sort numbers by value” to sort numbers in natural order.
- Where do blank lines go?
- Blank and whitespace-only lines always go to the end, whether you sort A to Z or Z to A.
- Does sorting remove duplicate lines?
- No. Every line is kept, including repeats. Use Remove Duplicate Lines first if you want each line only once.
- How are accented letters sorted?
- Accented letters sort next to their base letter — “éclair” sorts with the e’s, just after “eclair” — using English alphabetical rules.
- Can I upload a Word document or PDF instead of pasting?
- Yes. Upload Document accepts .txt, .md, Word .docx, and text-based .pdf files, or you can drop a file onto the text box. The file is read in your browser — it is not sent to Looty Tools — and its text replaces whatever is in the box. Scanned PDFs without a text layer and older .doc files are not supported.
- Is my list uploaded?
- No. Lines are sorted in your browser and the text never leaves your device.
