Skip to content
kitto works
All tools

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

Enter some text to see the result here.

How to use

  1. Paste your text into the box, one item per line.
  2. Choose an operation: sort ascending, sort descending, remove duplicates, or shuffle.
  3. 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

  1. If "Trim whitespace from each line" is on, each line is trimmed first.
  2. 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).
  3. 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.