Sort Text Alphabetically

Sort lines of text in ascending or reverse order.

Input

Examples:

Output

What is alphabetical sort?

Sorting text alphabetically means arranging lines (or words) in A–Z or Z–A order. Each line is treated as one item, so a list of names, tags, or keywords can be reordered consistently without manual editing.

Why this tool is useful

Lists often need to be alphabetized for readability, deduplication follow-up, or compliance with style guides. Doing it by hand is error-prone for long lists. This tool sorts lines as you paste; use the button to switch between A–Z and Z–A. All processing is client-side and instant.

Example usage

Paste lines like "banana", "apple", "cherry" and the output becomes "apple", "banana", "cherry" in A–Z order. Toggle to Z–A for reverse order. Empty lines are preserved so you can sort blocks without losing structure.

How to use this tool

Paste or type your text in the input box. Lines are sorted automatically. Use the Sort A–Z / Sort Z–A button to flip order. Copy the result or clear to start over. For removing duplicate lines first, use Remove Duplicate Lines; for word-level stats, try Word Counter.