Word Count

Sort Lines

Paste any list and sort lines alphabetically A-Z or Z-A, by character length, or shuffle into a random order — all processing is client-side in your browser, so your data never leaves your device. Preview the result before applying.

Input Text

Sort Mode

Choose how lines should be ordered, then click Apply.

Why Use This Tool?

Sorting lines of text is one of the most common data-cleaning tasks — whether you are alphabetising a word list, ranking URLs by length, organising config keys, or randomising quiz question order. This sort lines tool applies the operation instantly inside your browser using Unicode-aware lexicographic comparison for alphabetical sorts and the Fisher-Yates algorithm for shuffling. Your data never leaves your device.

  • Alphabetical Sorting: Sort any list A-Z or Z-A using JavaScript's localeCompare for correct Unicode handling — works with accented characters, mixed-case entries, and multilingual text.

  • Sort by Character Length: Order lines by their character count to quickly surface the shortest or longest entries — useful for cleaning API response fields, formatting code, or finding outlier strings.

  • Shuffle Lines: Randomise line order with the Fisher-Yates algorithm, which guarantees a statistically uniform distribution — every permutation has an equal probability of appearing.

  • Case-Sensitive Toggle: Control whether uppercase and lowercase letters sort as distinct values — enable case-sensitive mode when sorting programming identifiers, file names, or any list where capitalisation carries meaning.

  • Before/After Preview: Inspect the reordered list in a side-by-side panel before committing — see exactly how your lines will look after sorting, then click Apply only when the result is what you need.

How to Use It

  1. 1

    Paste your list into the text area above — one item per line. You can paste from a spreadsheet column, a log file, or any other source.

  2. 2

    Choose a sort mode: A → Z, Z → A, Shortest First, Longest First, or Shuffle. Toggle Case Sensitive if capitalisation matters for alphabetical sorts.

  3. 3

    Review the Preview panel to see the reordered lines before committing. The After column shows exactly how your text will look once you apply.

  4. 4

    Click Apply to update the text area with the sorted result, then Copy Result to send it to your clipboard.

Frequently Asked Questions

Sort any list in seconds — right in your browser, no account needed.