A Python package for bi-directional transliteration of Cyrillic script to Latin script and vice versa.
By default, transliterates for the Serbian language. A language flag can be set in order to transliterate to and from Belarusian, Bulgarian, Greek, Montenegrin, Macedonian, Mongolian, Russian, Serbian, Tajik, and Ukrainian.
Note: Greek is also supported. While Greek uses its own alphabet and is not Cyrillic, it has been included due to user demand and shared transliteration needs.
What is transliteration?
Transliteration is the conversion of a text from one script to another. For instance, a Latin alphabet transliteration of the Serbian phrase "Мој ховеркрафт је пун јегуља" is "Moj hoverkraft je pun jegulja".
Citation
A citation would be much appreciated if you use CyrTranslit in a research publication:
@software{georges_labreche_nov2025,
author = {Georges Labrèche},
title = {CyrTranslit},
month = nov,
year = 2025,
note = {{A Python package for bi-directional
transliteration of Cyrillic script to Latin script
and vice versa. Supports transliteration for Belarusian,
Bulgarian, Greek, Montenegrin, Macedonian, Mongolian,
Russian, Serbian, Tajik, and Ukrainian.}},
publisher = {Zenodo},
version = {1.2.0},
doi = {10.5281/zenodo.17663256},
url = {https://doi.org/10.5281/zenodo.17663256}
}
Advancing research
CyrTranslit is actively used as a reliable tool to advance research! Here's an incomplete list of publications for research projects that have relied on CyrTranslit:
Text Normalization, Unicode Perturbations & Robustness
Ljajić, Adela, Prodanović, Nikola, Medvecki, Darija, Bašaragin, Bojana, and Mitrović, Jelena. (2022). "Topic Modeling Technique on Covid19 Tweets in Serbian," Proceedings of the 12th International Conference on Information Society and Technology (ICIST 2022).
>>> import cyrtranslit
>>> cyrtranslit.to_latin("Съединението прави силата!", "bg")
"Săedinenieto pravi silata!"
>>> cyrtranslit.to_cyrillic("Săedinenieto pravi silata!", "bg")
"Съединението прави силата!"
>>> import cyrtranslit
>>> cyrtranslit.to_latin("Моето летачко возило е полно со јагули", "mk")
"Moeto letačko vozilo e polno so jaguli"
>>> cyrtranslit.to_cyrillic("Moeto letačko vozilo e polno so jaguli", "mk")
"Моето летачко возило е полно со јагули"
>>> import cyrtranslit
>>> cyrtranslit.to_latin("Моё судно на воздушной подушке полно угрей", "ru")
"Moyo sudno na vozdushnoj podushke polno ugrej"
>>> cyrtranslit.to_cyrillic("Moyo sudno na vozdushnoj podushke polno ugrej", "ru")
"Моё судно на воздушной подушке полно угрей"
Serbian
>>> import cyrtranslit
>>> cyrtranslit.to_latin("Мој ховеркрафт је пун јегуља")
"Moj hoverkraft je pun jegulja"
>>> cyrtranslit.to_cyrillic("Moj hoverkraft je pun jegulja")
"Мој ховеркрафт је пун јегуља"
>>> import cyrtranslit
>>> cyrtranslit.to_latin("Під лежачий камінь вода не тече", "ua")
"Pid ležačyj kamin' voda ne teče"
>>> cyrtranslit.to_cyrillic("Pid ležačyj kamin' voda ne teče", "ua")
"Під лежачий камінь вода не тече"
Accented Characters (Macedonian & Bulgarian)
CyrTranslit supports Cyrillic characters with grave accents used in Macedonian and Bulgarian for homograph disambiguation and stress marking. By default, accents are stripped during transliteration for cleaner output. Use the preserve_accents parameter to preserve them.
Supported Accented Characters
Macedonian:
Ѐ/ѐ (U+0400/U+0450) - Cyrillic IE with grave
Purpose: Distinguishes homographs (e.g., нѐ "us" vs не "no", сѐ "everything" vs се "reflexive pronoun")
Standard: ISO 9:1968/1995, adopted by Macedonian Academy of Arts and Sciences (1970)
Ѝ/ѝ (U+040D/U+045D) - Cyrillic I with grave
Purpose: Distinguishes homographs (e.g., ѝ "her" vs и "and")
Standard: ISO 9:1968/1995
Bulgarian:
Ѝ/ѝ (U+040D/U+045D) - Cyrillic I with grave
Purpose: Stress marking and homograph disambiguation (e.g., ѝ "her" vs и "and")
Standard: ISO 9:1995
Sources:
ISO 9:1995 - Information and documentation — Transliteration of Cyrillic characters into Latin characters
Use the -c argument to accomplish the reverse, that is to input latin characters and output cyrillic.
Use the -h argument for help.
You can also omit the input and output files and use standard input/output
$ echo 'Мој ховеркрафт је пун јегуља' | cyrtranslit -l sr
Moj hoverkraft je pun jegulja
$ echo 'Moj hoverkraft je pun jegulja' | cyrtranslit -l sr
Мој ховеркрафт је пун јегуља
File Encodings
By default, input files are expected to be UTF-8. For files with different encodings, use the -e/--encoding parameter:
$ cyrtranslit -l BG -i file.txt -e windows-1251
If no encoding is specified and encoding fails with the default UTF-8, then CyrTranslit automatically tries the following common Cyrillic encodings: windows-1251, iso-8859-5, koi8-r, and cp866.
Try CyrTranslit by running it directly on the Python command line interface, e.g.:
Include support for other Cyrillic script alphabets. Follow these steps in order to do so:
Create a new transliteration mapping file in the mapping/ directory (using the language code as the filename, e.g., xx.py) and reference to it in the TRANSLIT_DICT dictionary in mapping/__init__.py. If the language uses accented characters (like Macedonian and Bulgarian), create separate accented dictionaries (e.g., XX_CYR_TO_LAT_ACCENTED_DICT) following the pattern in mk.py or bg.py.
Watch out for cases where two consecutive Latin alphabet letters are meant to transliterate into a single Cyrillic script letter. These cases need to be explicitly checked for inside the to_cyrillic() function in __init__.py.