๐Ÿ”ค

Sort Text Lines

Sort lines alphabetically, numerically or by length, reverse them, or shuffle them randomly.

Built and maintained by Abdur Rehman ยท Free, no sign-up

Loading Sort Text Linesโ€ฆ
๐Ÿ”’PrivateRuns in your browser โ€” nothing is uploaded.
โšกFastInstant results, no waiting in queues.
๐Ÿ’ธFreeNo sign-up, no watermark, no limits.
๐Ÿ“ฑAnywhereWorks on phone, tablet and desktop.
</> Embed this tool on your website โ€” free

Paste this code into any web page or blog post (WordPress: use a โ€œCustom HTMLโ€ block). It's free for personal, school and business sites โ€” just keep the credit link.

How to use the Sort Text Lines

  1. Paste your lines
  2. Choose how to sort
  3. Copy the sorted list

Sort a list in one click

Paste a list with one item per line and choose how to sort it: A โ†’ Z or Z โ†’ A, numbers ascending or descending, shortest first or longest first, reverse order, or shuffle randomly. Options: Natural sort (so โ€œApple 2โ€ comes before โ€œApple 10โ€), ignore case, and remove empty lines.

Names, words and references

  • Names by surname โ€” write them as โ€œLast, Firstโ€ before sorting.
  • Words on a single line โ€” put each word on its own line first.
  • Reference lists โ€” APA and MLA lists are ordered by the first author's surname, so paste one reference per line and sort A โ†’ Z.

In other programs

  • Word โ€” Home โ†’ Sort (Aโ†’Z).
  • Excel โ€” Data โ†’ Sort A to Z.
  • Google Docs has no built-in sort; paste the list here, sort it, and paste it back.
  • Notepad++ โ€” Edit โ†’ Line Operations โ†’ Sort Lines Lexicographically Ascending.
  • VS Code โ€” Command Palette โ†’ โ€œSort Lines Ascendingโ€.
  • Sublime Text โ€” Edit โ†’ Sort Lines (F9).
  • Linux โ€” sort file.txt; add -V for natural order.

Your list stays in your browser.

โœ๏ธ Keep exploring Text Tools

See all Text Tools