Sort & Deduplicate Lines | Sort, Remove Duplicates, Shuffle Text Lines
Sort lines of text ascending or descending, remove duplicate lines, or shuffle them into a random order — all for free. Also supports trimming whitespace, removing blank lines, and case-insensitive comparison. Everything runs in your browser and your text is never sent anywhere.
Your text is processed entirely in your browser and is never sent anywhere.
Result
- Input lines
- 0
- Output lines
- 0
- Blank lines removed
- 0
- Duplicates removed
- 0
There are too many lines, so only the first 50,000 lines were processed.
Enter some text to see the result here.
How to use
- Paste your text into the box, one item per line.
- Choose an operation: sort ascending, sort descending, remove duplicates, or shuffle.
- Optionally turn on trimming, blank-line removal, or case-insensitive comparison. The result updates right away.
How it works
How lines are split
The text is split into lines at each newline (\n). Empty input is treated as a single empty line.
Processing order
- If "Trim whitespace from each line" is on, each line is trimmed first.
- If "Remove blank lines" is on, lines that are empty or contain only whitespace are removed next (this works correctly even if trimming is off).
- The chosen operation (sort, deduplicate, or shuffle) is applied.
How sorting works
Sorting uses a simple comparison based on Unicode code points, rather than a language-specific dictionary order — this keeps the result identical across every browser and OS. In practice this produces an intuitive order for most Latin text, but strings containing digits (like "2" and "10") are compared as text, not as numbers, so "10" can end up before "2".
With "Ignore case" on, the comparison uses a lowercased copy of each line, but the line as shown in the result keeps its original capitalization.
How duplicate removal works
The first occurrence of each line is kept; later lines with the same content are removed. The original order is preserved.
How shuffle works
Lines are randomly reordered using the well-known Fisher–Yates algorithm. Use "Shuffle again" if you want a different random order.
What gets sent anywhere
Nothing. Your text and the options you choose are never sent outside your browser — everything runs client-side in JavaScript.
FAQ
Does this tool send my text anywhere?
No. Sorting, deduplication, and shuffling all happen entirely in your browser, and nothing is sent to a server.
Does sorting put lines in true alphabetical/dictionary order?
Not exactly — it uses a simple Unicode code-point comparison rather than a language-specific dictionary order. This gives an intuitive result for most text, but fine details (like accented characters or diacritics) may not sort exactly the way a dictionary would.
Can numbers be sorted numerically?
No — every line is compared as text, so "10" can end up before "2" because the character "1" is smaller than "2". If you need numeric order, review and adjust the result manually.
How does duplicate removal handle lines that differ only in case?
By default they're treated as different lines. Turn on "Ignore case" to treat lines that differ only in uppercase/lowercase as duplicates — the first version encountered is kept.
What happens to blank lines?
By default they're kept as-is. Turn on "Remove blank lines" to strip out any line that's empty or contains only whitespace.
Related tools
- Character Counter — Manuscript Pages & Social Media LimitsCount characters and lines in real time, plus a 400-character manuscript-page estimate and UTF-8 byte size. Check whether your text fits X, Threads, Instagram, LinkedIn or Bluesky limits, or any custom limit you set. Everything runs in your browser — nothing is ever sent anywhere.
- Emoji Picker — Search by Name or Meaning, Copy in One ClickSearch over 210 emoji across 9 categories (smileys, gestures, animals, food, and more) by name or keyword, and copy them in one click. Your search terms and copied emoji are processed entirely in your browser — nothing is ever sent anywhere.
- Full-width / Half-width Converter — Numbers, Letters & KatakanaConvert numbers, letters, katakana and spaces between full-width and half-width forms, all at once. Handles half-width katakana voiced marks correctly (e.g. ガ → ガ). Everything runs in your browser — nothing is ever sent anywhere.
- Kaomoji Maker — Browse by Emotion, Copy in One ClickSearch Japanese emoticons (kaomoji) across 12 emotion and mood categories — happy, sad, angry, shy, and more — by keyword or category, and copy any of them with one click. Your search terms and copied kaomoji stay in your browser and are never sent anywhere.
- All tools