textFree

Text Sorter

Sort lines alphabetically, numerically, or by length.

Free — no signupYour input stays on this device for this operation.Learn how to use Text Sorter →
Text Sorter illustration
Sorted ResultLive
Apple
Banana
Cherry
Date

01 Overview

About Text Sorter

Text Sorter arranges the lines of your text into order — alphabetically for names and words, numerically for numbers, or by line length when the shortest or longest entries matter. A sorted list is easier to scan and compare, and sorting puts near-duplicates next to each other where they are easy to spot. Sorting changes only the order of lines, never the text inside them, and it does not remove duplicates. It runs entirely in your browser, so your lists stay on your device.

Adjust the options and review your result before downloading.
See our privacy policy for input handling and usage information.
Use a modern browser. Availability and performance depend on your device and the selected tool.

02 Workflow

How to use Text Sorter

  1. 1
    Paste your textAdd your list with one item per line. Nothing is uploaded.
  2. 2
    Choose the sort modeAlphabetical for names and words, numerical for numbers, or by length for shortest/longest first.
  3. 3
    Run and reviewCheck the sorted order; try a different mode if the first order does not help.
  4. 4
    Copy the sorted listScan for near-duplicates while similar lines sit together, then paste the result into your document or spreadsheet.

03 Good to know

Frequently Asked Questions

Which sort should I choose?

Choose alphabetical for names and words, numerical for numbers, and by length when the size of each line matters, such as finding the shortest or longest entries.

Does the Text Sorter remove duplicates?

No. It only changes the order of lines. If you also need duplicates removed, use the Remove Duplicate Lines tool on the sorted or original list.

Does sorting change the text inside each line?

No. Each line stays exactly as you pasted it. Only the order of the lines changes.

Why does 10 come before 2 when I sort alphabetically?

Because alphabetical sorting compares text character by character, and 1 comes before 2 — so 10, 100 and 11 all sort ahead of 2. If you are sorting numbers, choose the numerical mode instead, which compares the values and puts 2 before 10.

What does sorting by line length do?

It orders your lines from the shortest to the longest, or the longest to the shortest, depending on the direction you choose. It is useful when the size of each entry matters — finding the shortest names in a list, for example, or the longest lines in a file.

Can I sort a list of dates?

Dates sort reliably only when they are written in a consistent format, such as year-month-day (2026-11-12), because that order is alphabetical and chronological at the same time. Dates written day-first or month-first will sort in the wrong order, so rewrite them in year-first format before sorting.

Can I sort a list and then remove duplicates from it?

Yes. Sorting does not remove duplicates — it only changes the order — so run the sorted list through the Remove Duplicate Lines tool afterwards. Sorting first helps because it puts near-duplicates next to each other, where they are easy to spot before you dedupe.