Turkish Alphabetical Sort

Sort Turkish with ç, ğ, ı, ö, ş, ü at correct positions

Sort a list of Turkish words using the Turkish alphabet order, where ç follows c, ğ follows g, ı and i are distinct letters, and ö, ş, ü sit in their proper places. Avoids the wrong order a plain ASCII or English sort produces.

Why does a normal sort get Turkish wrong?

A default ASCII or English sort puts accented letters like ç and ş after z, and treats the Turkish dotless ı and dotted i incorrectly. Turkish has its own 29-letter alphabet order that interleaves these letters in specific positions.

Turkish has a 29-letter alphabet with several letters that a plain English or ASCII sort handles wrong: ç, ğ, ı, ö, ş, and ü. This tool sorts your list using the real Turkish alphabet order, so words land where a Turkish dictionary would put them.

How it works

The Turkish alphabet order is fixed:

a b c ç d e f g ğ h ı i j k l m n o ö p r s ş t u ü v y z

The tool assigns each letter a rank from this sequence and compares words letter by letter on those ranks rather than on Unicode code points. The two critical differences from a generic sort are:

  1. ç, ğ, ş, ö, ü are interleaved, not dumped after z. For example ç sorts immediately after c, before d.
  2. ı and i are distinct letters, with dotless ı sorting before dotted i. Casing is normalised the Turkish way so that İ pairs with i and I pairs with ı.

Characters not in the Turkish alphabet (digits, punctuation, Latin q/w/x) are given a rank after all Turkish letters so they sort to the end consistently.

Tips and example

  • Input zeytin, çay, armut, ışık, incir sorts to armut, çay, incir, ışık, zeytin — note ç right after a-words and ı before i.
  • Sorting is stable for equal keys, so two identical words keep their input order.
  • Use descending mode to reverse the Turkish order rather than just reversing an English sort, which would otherwise misplace the accented letters again.