Sort lines
Sort lines of text alphabetically, in natural number order or by length, reverse or shuffle them, with case and trimming options.
Runs in your browserNothing uploadedWorks offline
Loading Sort linesRuns on this device. Nothing is uploaded.
Questions
What is natural sort?
It reads numbers inside lines as numbers, so "file 2" comes before "file 10". Plain alphabetical order would put "file 10" first because 1 comes before 2.
How random is the shuffle?
It uses the Fisher and Yates shuffle with random numbers from your browser's crypto API, so every order is equally likely. Press Shuffle again for a new order.
Does it sort accented letters correctly?
Yes. Sorting uses your browser's language-aware collation, so "é" sorts next to "e" rather than after "z".
Related tools
All text and documents toolsText and documentstxt md csvShuffle linesPut lines of text in a random order, for raffles, quiz questions or test data, and shuffle again with one click.Text and documentstxt md plaincamelCase converterTurn phrases, column names or snake_case into camelCase identifiers, one per line, as you type.Text and documentstxt md plainCase converterChange text to UPPER, lower, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case or CONSTANT_CASE as you type.Text and documentstxt md markdownCharacter counterCount characters as you type, spaces included, with the count without spaces, words and sentences next to it.Text and documentstxt md plainClean AI textFix text pasted from ChatGPT, Claude and terminals: show and remove hidden characters, rejoin broken lines, fix quotes, spaces and Markdown.Text and documentstxt md csvCompare text (diff)Compare two texts or files side by side or inline, by line, word or character, with changes highlighted and a downloadable patch.