Sort multi-line text by line, supporting both ascending (A-Z) and descending (Z-A) order. All processing is local in your browser — no server upload.

Features
- Paste multi-line text.
- One-click ascending or descending sort.
- Choose whether to ignore or respect leading/trailing spaces.
- Quick result copy supported.
Use Cases
- List organization: Sort names, emails, phone numbers alphabetically or numerically for easier management.
- Data sorting: Sort extracted keywords, tags, or IDs to improve readability.
- Log analysis: Sort log entries by time or keyword for easier searching and analysis.
How to Use
- Paste text (one item per line) in the input box above.
- Choose space handling: default “Ignored leading/trailing spaces”, or “Respect leading/trailing spaces”.
- Click "Ascending" or "Descending" to sort.
- Ascending: Arrange from small to large by locale natural order (case-insensitive for letters; numeric comparison for digits).
- Descending: Arrange from large to small by locale natural order.
- Sorting results display in the output box below and auto-copy to clipboard.
Notes
- Sorting rule:
Intl.Collator('zh-Hans-CN', { numeric: true, sensitivity: 'base' }); case-insensitive for English letters, numeric comparison for digit segments (e.g.,2comes before10). - Leading/trailing spaces: ignored by default (trim); in respect mode, spaces participate in comparison and remain in the result. Empty lines after trim are dropped in ignore mode; only fully empty lines are dropped in respect mode.
- No duplicate removal: This tool only adjusts line order; use the "Text Deduplicate" tool to remove duplicates.
Related Keywords
Text Sort, Online Text Sort, textsort, leading trailing spaces, Sanye Hub, Online Tools, 10000