TT Text Tools

Sort Lines

Sort lines alphabetically in ascending or descending order with optional case-insensitive sorting and blank-line removal.

🔒 Runs entirely in your browser — nothing is uploaded

Was this tool useful? Rate it:

Sort lists alphabetically in your browser

Alphabetical sorting is a small task that shows up constantly. You may need to order names before sending a list, arrange keywords before importing them, compare sets of URLs, organize filenames or tidy copied rows from a spreadsheet. This sorter handles those quick jobs without making you open a full spreadsheet app. Paste the lines, choose the order and copy the sorted result. All processing stays in the browser, which is especially helpful when the list contains private drafts, internal labels or customer-related text.

The tool treats each line as a separate item. Ascending order sorts from A to Z, while descending order reverses the comparison. You can keep blank lines when their position matters, or remove them before sorting when you want a compact list. The output is plain text, so it can be pasted back into editors, issue trackers, documents, CMS fields or command-line workflows.

Case-sensitive versus case-insensitive sorting

Case-insensitive sorting is usually best for human-readable lists because it groups words regardless of capitalization. For example, “apple” and “Apple” are compared as the same word. Case-sensitive sorting can be useful for technical text where uppercase and lowercase may carry meaning, such as code constants, identifiers or generated values. The option lets you pick the behavior that matches your source material.

Useful list cleanup examples

Sort a set of tags before adding them to documentation. Order a list of redirects so reviewers can scan it more easily. Arrange meeting attendees or task names for a report. Clean a copied column that includes blank rows. For larger or critical datasets, still keep a backup of the original text before replacing it. The sorter is designed for fast utility work, and a quick review of the result is always a good habit.

Like the rest of Text Tools, this page is designed for quick, repeatable utility work rather than account-based storage. Keep the original text nearby when the output matters, review the result, and copy only the final version you want to use.

How to use

  1. Paste line-based textAdd one item per line, such as names, URLs, keywords or notes.
  2. Set sort optionsChoose ascending or descending order and optional cleanup rules.
  3. Sort and copyClick sort lines, review the output and copy it wherever you need it.

Frequently asked questions

Does sorting happen online?
No. The browser sorts your text locally without uploading it.
What is case-insensitive sorting?
It compares uppercase and lowercase letters as equivalent, so Apple and apple sort together.
Can blank lines be removed?
Yes. Enable remove blank lines before sorting to leave only non-empty rows.
Is the original order preserved for equal lines?
Modern browser sorting is stable, so equal lines generally keep their relative order.