---
title: "Alphabetize List — Sort Lines A to Z & Remove Duplicates | fbuff"
description: "Put any list in alphabetical order, sort lines Z to A or by length, remove duplicate lines, shuffle, or compare two lists. Free, no signup, runs in your browser."
url: https://fbuff.com/tools/text-sorter/
---

![A jumble of list strips going through a funnel into a neat sorted list, with duplicates dropping into a bin](https://fbuff.com/content/text-sorter.webp)

## How to use

1. Paste your list into the Input box, one item per line.
2. Click SORT A→Z to alphabetize the list, SORT Z→A for reverse order, or BY LENGTH to go from shortest to longest.
3. Click DEDUP to remove duplicate lines (the first copy is kept and the removed ones are listed separately), TRIM to strip extra spaces, or SHUFFLE to put the lines in random order.
4. Tick Case-insensitive so that "Apple" and "apple" are treated as the same, and Remove empty lines to drop blank lines. Then click COPY.
5. To compare two lists, switch to COMPARE, paste List A and List B, and choose EXIST (exact matches) or CONTAINS (partial matches).

## How to alphabetize a list

Paste the list with one item per line and click SORT A→Z. Names, groceries, guest lists, book titles, keywords and email addresses all work the same way. The sort follows the alphabet of your browser's language, so accented letters such as é are placed next to e instead of after z.

If your items are separated by commas instead of line breaks, put each one on its own line first: in Word or Google Docs, use Find and replace to replace ", " with a line break, or paste the list into a spreadsheet column.

## What each button does

All actions work on the current result, so you can combine them: for example DEDUP, then SORT A→Z.

| Button | What it does | Example |
| --- | --- | --- |
| SORT A→Z | Alphabetical order | banana, Apple, cherry → Apple, banana, cherry |
| SORT Z→A | Reverse alphabetical order | → cherry, banana, Apple |
| BY LENGTH | Shortest line first, ties in A→Z order | fig, kiwi, banana |
| DEDUP | Removes repeated lines, keeps the first | red, blue, red → red, blue |
| TRIM | Removes spaces at the start and end of each line | " milk " → "milk" |
| SHUFFLE | Random order, each order equally likely | For drawing names or seating |

## Numbers and mixed case

Lines are sorted as text, not as numbers, so "Item 10" comes before "Item 2", the same as in a file folder sorted by name. Write numbers with leading zeros (Item 02, Item 10) if you need them in numeric order.

Case-insensitive also affects DEDUP: with it ticked, "Email@Example.com" and "email@example.com" count as the same line, which is useful when cleaning a mailing list.

## Compare two lists

EXIST shows which lines of List B also appear in List A, and which do not, for example which invited guests have replied. CONTAINS finds lines in List A that include any line of List B as part of the text, for example which product names contain a brand. Tick Trim before compare to ignore stray spaces.

## Frequently asked questions

### How do I put a list in alphabetical order?

Paste it with one item per line, click SORT A→Z, then click COPY. Tick Remove empty lines first if the list has blank lines in it.

### How do I remove duplicates from a list?

Click DEDUP. The first time each line appears is kept and later copies are removed; the removed lines are shown in a separate box so you can check them. Tick Case-insensitive to treat capital and small letters as the same.

### Can I sort a column from Excel or Google Sheets?

Yes. Copy the column, paste it here, sort or remove duplicates, then copy the result and paste it back. Each cell becomes one line.

### Is there a limit on how many lines I can sort?

Not in practice. Lists of tens of thousands of lines sort in a moment, because everything runs on your own device.

### Is my list uploaded?

No. Sorting and comparing happen in your browser, and nothing you paste is sent or stored.

Found a problem or have an idea? [Report a problem](https://fbuff.com/contact/?tool=text-sorter)

Share

## You might also like

- - [Pipe Delimiter Data Splitter Split and filter data columns using a pipe delimiter. Extract information quickly and format accounts easily.](https://fbuff.com/tools/pipe-data-splitter/)
- - [Readability Score Flesch-Kincaid reading ease, grade level, word count, and reading time.](https://fbuff.com/tools/readability-score/)
- - [Text Diff Checker Paste two texts and instantly see word-level differences highlighted.](https://fbuff.com/tools/text-diff/)
- - [String Case Converter Convert text to UPPERCASE, lowercase, camelCase, snake_case, kebab-case, PascalCase, and Title Case, with optional accent removal.](https://fbuff.com/tools/case-converter/)
- - [HTML Text Extractor Strip HTML tags and extract plain text from any HTML. Handles scripts, styles, tables and links.](https://fbuff.com/tools/html-text-extractor/)
- - [Word Counter Count words, characters, sentences, and analyze text statistics.](https://fbuff.com/tools/word-counter/)
- - [Lorem Ipsum Generator Generate Lorem Ipsum placeholder text by paragraphs, sentences, or words. Copy instantly. 100% client-side.](https://fbuff.com/tools/lorem-ipsum/)
- - [Text Reverser Reverse text characters, word order, or line order. Flip text upside down with Unicode. 100% client-side.](https://fbuff.com/tools/text-reverser/)
- - [Password Generator Generate strong random passwords instantly. 100% client-side.](https://fbuff.com/tools/password-generator/)
- - [2FA Code Generator Generate TOTP codes from your 2FA secret key. Never leaves your browser.](https://fbuff.com/tools/2fa-code/)
