KOI8-R is the classic single-byte encoding for Russian Cyrillic, standardised in RFC 1489 and ubiquitous in pre-Unicode Russian email, news, and Unix systems. This tool converts Cyrillic text to KOI8-R hex bytes and decodes KOI8-R bytes back to text, running entirely in your browser.
How it works
KOI8-R maps every character to exactly one byte. The lower half 0x00–0x7F is
plain ASCII; the upper half 0x80–0xFF carries Cyrillic letters and some
box-drawing symbols. Its most famous property is the deliberate ordering of the
Cyrillic block: each letter sits at the code point whose low 7 bits spell a
phonetically related Latin letter, so stripping the high bit turns Cyrillic text
into a rough Latin transliteration rather than noise.
The tool builds the exact byte-to-character table in your browser using the platform’s native KOI8-R decoder, then inverts it for encoding. Decoding feeds your hex bytes straight through that same decoder.
The clever 7-bit fallback design
The designers of KOI8-R made a deliberate choice: if the high bit of each byte
is cleared — as would happen when Cyrillic text passes through an old 7-bit-only
mail server or terminal — the surviving low-7-bit bytes happen to spell a Latin
transliteration of the Russian. The Russian word РЫНОК (market) encoded in
KOI8-R, with the high bit stripped, becomes something like rynok in Latin
letters, preserving readability. This was a practical solution to the reality that
much 1990s internet infrastructure was built for 7-bit ASCII and silently stripped
the 8th bit from non-ASCII bytes.
Example encoding
"Привет, мир" (Privet, mir — Hello, world) encodes to the KOI8-R bytes:
П р и в е т , м и р
f0 d2 c9 d7 c5 d4 2c 20 cd c9 d2
Each Cyrillic letter becomes one byte in the 0x80–0xFF range; the comma (0x2C)
and space (0x20) stay as plain ASCII.
When you encounter KOI8-R today
KOI8-R is most often encountered in:
- Legacy email archives. Email from Russian-speaking users before the mid-2000s
was frequently encoded in KOI8-R or Windows-1251. If a
.emlfile showscharset=koi8-rin the Content-Type header, decode its body bytes with this tool. - Old Usenet posts. Russian-language Usenet groups were predominantly KOI8-R; archived posts from the 1990s and early 2000s may still arrive in this encoding.
- Unix configuration files. Some older Russian Linux distributions and configs stored comments and strings in KOI8-R.
- IRC and chat logs. Pre-Unicode IRC channels for Russian speakers often used KOI8-R.
KOI8-R covers Russian but not all Cyrillic; Ukrainian-specific letters such as Ї, Є, and І live in the related KOI8-U variant (RFC 2319) and will be flagged as unmapped here. Windows-1251 is the other common single-byte Russian encoding and has different byte values for the same letters.