We use essential storage to make the site work. If you accept, we also use Google Analytics to understand usage and Google AdSense to show ads, which may set cookies. You can change your choice any time with Cookie settings in the footer. Privacy Policy
Sort Lines
Sort text alphabetically, numerically, by length, in reverse or shuffled order. Dedupe and trim lines locally in your browser. Free, no sign-up.
How to use
Paste Lines — Paste your list of lines into the input.
What's the difference between alphabetical and natural sort?
Alphabetical sorts strings character by character, so 'item10' comes before 'item2'. Natural sort treats embedded numbers numerically, so 'item2' comes before 'item10'.
How does numeric sort handle non-numbers?
Lines that don't start with a number are pushed to the end. Pure number lines are sorted by value.
Is the sort stable?
JavaScript's Array.sort is stable as of ES2019, so equal-keyed lines preserve their original order.
Can I sort thousands of lines?
Yes. The tool sorts entirely in your browser and handles tens of thousands of lines smoothly.
Is my text sent anywhere?
Your text is processed in your browser and is not sent to our servers.
Free Online Sort Lines Tool
Sort any list of lines instantly — alphabetically, numerically, by length, in reverse, or randomly. The tool also dedupes, trims whitespace, removes blanks, and supports case-sensitive ordering. Everything runs locally in your browser.
Sort Modes Explained
Alphabetical: Lexicographic order using your locale's collation rules.
Natural: Treats numbers inside strings as numbers — perfect for filenames like file1, file2, file10.
Numeric: Sorts by parsed number value.
Length: Sorts shortest to longest line.
Reverse: Flips the existing order without re-sorting.
Shuffle: Randomizes line order using Fisher–Yates.
Common Use Cases
Cleaning lists: Sort and dedupe email lists, usernames, or domains.
Code review: Sort imports, dependencies, or environment variables alphabetically.
Content workflows: Order tags, keywords, or product names.
Data prep: Sort rows before pasting into spreadsheets or scripts.
Privacy
Your text is processed in your browser and is not sent to our servers.