Sort Lines — Alphabetical, Numeric & Length Sort with Unique
Sort lines alphabetically, numerically, by length, or just reverse. Locale-aware, case-insensitive and unique options.
How to use
- 1 Paste one item per line.
- 2 Pick a sort mode — alphabetical, numeric, by length, or just reverse.
- 3 Toggle case-sensitive, locale-aware, trim, and unique as needed.
- 4 Copy the sorted result.
Why use this tool
- Numeric mode parses the leading number per line, so 2 comes before 10 (not after).
- Locale-aware sort uses Intl.Collator — the same comparison your OS file manager uses.
- Length sort is handy for finding the longest or shortest entry in a list.
- Reverse flips order without comparing anything.
Frequently asked questions
Why does alphabetical sort give 1, 10, 100, 2, 20?
That is correct alphabetical order — character "1" comes before "2". Switch to Numeric ascending for true number order.
What if a line has no number in numeric mode?
Lines without a parseable number get pushed to the bottom and ordered alphabetically among themselves.
Does Unique remove case-insensitive duplicates?
It respects the Case-sensitive toggle — if off, apple and Apple are treated as the same line.
Related?
Use Deduplicate Lines for just removing duplicates without sorting, or Filter Lines to keep only matching lines.
What is Sort Lines?
A Sort Lines is a tool that sorts lines of text alphabetically, numerically, by length, or simply reverses their order. It runs in the browser and is locale-aware, with case-insensitive and unique-only options to control comparison and remove duplicates while sorting.
Features
Multiple sort modes
Alphabetical, numeric, by length, or simple reverse.
Unique & case options
Remove duplicates and sort case-insensitively while you order the list.
100% private
Sorting happens locally — your text never leaves the browser.
Example
Input
banana
apple
cherry
Output
apple
banana
cherry
Common use cases
-
1
Tidy a list
Alphabetize names, imports, or config keys for readable diffs.
-
2
Deduplicate entries
Sort with unique-only to drop repeated lines from a paste.
-
3
Order data numerically
Sort lines by their leading number instead of lexicographically.
Zerethon's sort-lines tool orders lines of text alphabetically, numerically, by length, or in reverse — in your browser. Locale-aware comparison plus case-insensitive and unique-only options let you clean and dedupe a list in one pass. Nothing is uploaded.
- Category
- Developer
- Pricing
- Free
- Privacy
- Browser-based
- Signup
- Not required
References
- String.prototype.localeCompare() — MDN — MDN
- Collation — Wikipedia — Wikipedia
Privacy
Your data never leaves your browser unless explicitly stated. Sort Lines runs entirely client-side — no server upload, no logging, no tracking of your input.
Related tools
JSON Formatter
Format, validate, and minify JSON online. Free, no signup — your data never leaves your browser.
Open toolSQL Formatter
Format SQL queries online — beautify MySQL, PostgreSQL, SQLite, SQL Server, Oracle, and BigQuery.
Open toolUUID Generator
Generate UUIDs online — v1, v4, v7, and Nil. Bulk generation up to 10,000. Free, no signup.
Open toolPassword Generator
Generate strong, cryptographically random passwords. Configurable length and character sets — runs in your browser.
Open toolBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.