Skip to content
cosmodev ~/tools/sort-lines

Satır Sıralama ve Tekilleştirme

Text & String

Satırları alfabetik, ters, karışık, tekilleştirilmiş veya uzunluğa göre sıralayın. Büyük/küçük harf duyarsız ve doğal sıralama desteklenir (file10'dan önce file2).

Deneyin:

(Dokümantasyon İngilizcedir)

What it does

Sort, dedupe, reverse, shuffle, or length-sort the lines of any text. Supports case-insensitive and natural sorting (so file2 comes before file10). 100% client-side — your text never leaves the browser.

How to use it

  1. Paste text into Input (one item per line), or tap a Try: sample chip above the mode switch.
  2. Pick a mode. The result updates live on the right.
  3. Toggle the options you need.
  4. Copy the result or Download it as sorted.txt.

Modes

Mode What it does
A→Z Alphabetical, ascending
Z→A Alphabetical, descending
Short Shortest lines first (ties keep their original order)
Long Longest lines first (ties keep their original order)
Reverse Mirrors the current line order — no sorting
Shuffle Deterministic random order (seeded, see below)
Unique Removes duplicate lines, keeping the first occurrence of each. Order is preserved — Unique does not sort

Options

  • Case sensitive — off by default, so Apple and apple compare as equal and interleave freely. Turn it on to sort uppercase and lowercase strictly apart.
  • Natural sort — off by default. On, embedded numbers sort by value instead of digit-by-digit, so file2 precedes file10. Applies to A→Z and Z→A only.

The result header shows the live line count, plus the removed-duplicate count when Unique is active. Download appears only when there is output to save.

Examples

All outputs below are verified against the tool’s actual behavior.

A→Z (default, case-insensitive) — original casing is preserved, only the order changes:

banana
apple
Cherry
apple
Date

→

apple
apple
banana
Cherry
Date

Case sensitive on (input: banana, Apple, cherry, apple, Banana):

  • Off → Apple, apple, banana, Banana, cherry
  • On → apple, Apple, banana, Banana, cherry

Natural sort (input: file10, file2, file1):

  • Off → file1, file10, file2
  • On → file1, file2, file10

Unique (input: readme.md, src/, readme.md, tests/, src/, readme.md) → readme.md, src/, tests/ — 3 lines, 3 duplicates removed, first-occurrence order kept.

Short (fruit sample above) → Date, apple, apple, banana, Cherry — lengths 4, 5, 5, 6, 6 with ties keeping their original order.

Good to know

  • Private: all processing is local.
  • Unique keeps the first occurrence of each line (case-insensitively matched by default) and preserves order — it never sorts. Combine it by first using A→Z, then Unique.
  • Shuffle is seeded, so the same input gives the same order every visit (the fruit sample shuffles to Date, Cherry, apple, banana, apple).
  • Clearing the input empties the result and hides the download button.
  • Related tools: Find & Replace, Text Diff Viewer.
Kaynak kodu14 dil

%100 istemci tarafında · verileriniz asla tarayıcınızdan çıkmaz. İşinize yaradı mı? Bir meslektaşınızla paylaşın.