RussianTransliterator 1.1.0

dotnet add package RussianTransliterator --version 1.1.0
                    
NuGet\Install-Package RussianTransliterator -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RussianTransliterator" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RussianTransliterator" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="RussianTransliterator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RussianTransliterator --version 1.1.0
                    
#r "nuget: RussianTransliterator, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RussianTransliterator@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RussianTransliterator&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=RussianTransliterator&version=1.1.0
                    
Install as a Cake Tool

Russian Transliterator

NuGet Downloads Build and tests .NET Standard 2.0

A small .NET library (NuGet package) that converts Russian Cyrillic text to Latin letters.

Привет, мир!  ->  Privet, mir!

Use it for URLs, file names, logins, email addresses, search and any place where only Latin letters are allowed.

Why this library

  • Correct letter case. One Russian letter can become several Latin letters (Щ → Shch). The library looks at the word and chooses the right case, so you get SHCHUKA, not ShchUKA.
  • Fast and saves memory. It reads the text only once. A text without Russian letters is returned as is, without new memory.
  • Very small. One class, about 9 KB, no dependencies.
  • Works everywhere. It targets .NET Standard 2.0: .NET 5 and newer, .NET Core 2.0+, .NET Framework 4.6.1+, Mono, Unity and more.
  • Same result on every computer. The result does not depend on the current culture of the system.
  • Safe for other text. Numbers, Latin letters, punctuation, emoji and letters of other alphabets stay unchanged.

How the letter case works:

Text Russian Transliterator Simple letter replacement
Щука Shchuka Shchuka
ЩУКА SHCHUKA ShchUKA
Журнал «ЖИЗНЬ» Zhurnal «ZHIZN» Zhurnal «ZhIZN»
Я ЛЮБЛЮ ЧАЙ YA LYUBLYU CHAY Ya LYuBLYu ChAY

Installation

dotnet add package RussianTransliterator

Or in the Package Manager Console in Visual Studio:

Install-Package RussianTransliterator

Usage

using RussianTransliteration;

var latin = RussianTransliterator.ToLatin("Какой-нибудь русский текст");

// or as an extension method
var latin = "Какой-нибудь русский текст".ToLatin();

Examples

Russian Latin
Яга Yaga
ЖКХ ZHKH
Белый Belyy
Василий Vasily
Бийск Biysk
Труха Truha
Вверх Vverkh
деревья derevya
сверхъестественное sverkhestestvennoe
iPhone в Минске iPhone v Minske
Отчёт_за_Январь_2026.docx Otchet_za_Yanvar_2026.docx

Rules

Russian Latin Russian Latin Russian Latin
а a к k х kh
б b л l ц ts
в v м m ч ch
г g н n ш sh
д d о o щ shch
е e п p ъ
ё e р r ы y
ж zh с s ь
з z т t э e
и i у u ю yu
й y ф f я ya

Special rules:

  • ъ and ь are removed: Объявление → Obyavlenie.
  • х after a vowel or after к becomes h: Труха → Truha, ЖКХ → ZHKH.
  • ий at the end of a word becomes y: Василий → Vasily, but Бийск → Biysk.

Benchmarks

Time and memory for one ToLatin call, measured with BenchmarkDotNet on AMD Ryzen 7 7800X3D:

Text Characters .NET 10 .NET Framework 4.8 Memory
Как выбрать тариф ЖКХ в 2026 году: советы и примеры 51 104.62 ns 218.02 ns 320 B
КАК ВЫБРАТЬ ТАРИФ ЖКХ В 2026 ГОДУ: СОВЕТЫ И ПРИМЕРЫ 51 123.62 ns 327.82 ns 320 B
Архив ЮРИДИЧЕСКИЙ отдел ЖКХ Щёлково ОХРАНА ТРУДА Счета и ПЛАТЁЖ за Январь–Июнь 2026 (Шаблоны ЦЕНЫ v2) ИТОГОВЫЙ.zip 114 304.44 ns 717.22 ns 600 B
How to choose a utility tariff in 2026: tips and examples 57 18.78 ns 24.53 ns 0 B
The full text of the novel "War and Peace" 3,606,380 15.07 ms 20.32 ms 14.9 MB

To run the benchmarks yourself:

# short texts
dotnet run -c Release -f net10.0 --project benchmarks/RussianTransliterator.Benchmarks -- --filter "*ToLatinBenchmarks*"

# "War and Peace"
dotnet run -c Release -f net10.0 --project benchmarks/RussianTransliterator.Benchmarks -- --filter "*BookBenchmarks*"

License

MIT-0: you can use this library for free in any project, including commercial ones, and you don't need to mention the author.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 112 10/26/2026
1.0.1.1 60,000 3/5/2023 1.0.1.1 is deprecated because it is no longer maintained.
1.0.1 35,323 8/11/2019 1.0.1 is deprecated because it is no longer maintained.
1.0.0 874 8/11/2019 1.0.0 is deprecated because it is no longer maintained.