π Runs in your browser β nothing is uploadedβ Free, no signup
Sort Lines & Remove Duplicates
Paste a list to sort it AβZ, ZβA, naturally or by length β and remove duplicate lines, empty lines and stray spaces in one go.
0 characters
Result
When should you use the Sort Lines?
- Alphabetizing a list of names, keywords or URLs
- Removing duplicate emails or IDs from a list
- Cleaning up lists copied from spreadsheets or logs
How to use the Sort Lines
- 1
Paste a list
One item per line.
- 2
Choose the order
A β Z, Z β A, natural (2 before 10), by length, reverse or shuffle.
- 3
Clean it
Remove duplicates, trim spaces and drop empty lines. Ignore case to treat Apple and apple as the same.
- 4
Copy
Copy the result or download it as a text file.
Examples
Sorted with duplicates removed
Before
banana apple cherry apple
After
apple banana cherry
Common errors and how to fix them
item10 sorts before item2- Choose Natural order β it compares the numbers inside text by value.
Duplicates weren't removed- Lines may differ by spaces or capitals. Keep Trim spaces on and tick Ignore case.
More from Text Tools
Free tools that run in your browser β no signup, nothing uploaded.
Word & Character Counter
Count words, characters, sentences and reading time as you type.
Case Converter
Convert text to camelCase, snake_case, kebab-case, Title Case and more.
Text Diff & Compare
Compare two texts and highlight every added and removed word or line.
Lorem Ipsum Generator
Generate placeholder paragraphs, sentences or words as text or HTML.
Fancy Text & Font Generator
Turn text into ππ¨π₯π, πͺπ΅π’ππͺπ€, ππΈππΎπ π and other Unicode font styles you can paste anywhere.
Remove Line Breaks & Extra Spaces
Remove line breaks, empty lines and extra spaces from text.
Word Frequency Counter
Count how often each word or phrase appears in a text.
JSON Auto-Fixer & Formatter
Repair, validate, and beautify broken JSON (missing quotes, trailing commas).
JSON Compare & Diff Tool
Find the difference between two JSON objects visually and quickly.
Sort Lines FAQ
Keep 'Remove duplicates' ticked. The first occurrence of each line is kept and the rest are removed. The number removed is shown under the result.
Sorting that understands numbers inside text, so file2 comes before file10. Plain alphabetical sorting would put file10 first.
By default capitals and lowercase are both considered. Tick 'Ignore case' to sort and dedupe without regard to case.
Yes β choose Shuffle for a random order. It uses a secure random generator.
Hundreds of thousands of lines work fine in a modern browser.
No. Everything runs in your browser, so your text never leaves your device.
