Long before ASCII, teleprinters spoke in five bits. This encoder turns ordinary text into ITA2 Baudot codes, handling the letters-versus-figures shifting that made a 32-code alphabet cover far more than 32 characters.
How it works
ITA2 assigns each printable character a 5-bit code. With only 32 codes available, the same bit pattern means two different things depending on the current mode. Two reserved codes switch modes:
LTRS = 11111 (switch to letters)
FIGS = 11011 (switch to figures and punctuation)
The encoder tracks the current mode. When the next character lives in the other mode, it first emits the appropriate shift marker, then the character’s code. Space, carriage return and line feed share one code across both modes, so they never force a shift.
Tips and notes
- Lowercase input is folded to uppercase, since ITA2 has no lowercase.
- The shift markers add to the code count whenever you alternate between letters and digits, which is why mixed text expands more than its character count.
- Characters outside the ITA2 repertoire are listed as skipped rather than silently mis-encoded.
A brief history of Baudot and ITA2
Émile Baudot invented his 5-bit telegraph code in the 1870s and it was designed to be typed on a 5-key piano-like keyboard with both hands — each key corresponding to one bit. The operator pressed combinations of keys simultaneously to produce each character, rather than tapping a single key at a time as with Morse.
Donald Murray reorganised Baudot’s original assignments in the early 1900s to place the most frequently used characters at the combinations least likely to cause mechanical jams, and added the idea of a paper tape punch. Murray’s version was standardised internationally as the International Telegraph Alphabet No. 2 (ITA2) and became the de facto standard for telex networks worldwide through most of the twentieth century.
ITA2 remained in active commercial use on telex networks well into the 1980s. Some specialist systems — weather services, certain military communications, and radio teletype (RTTY) used by amateur radio operators — continued to use it even longer.
The two-mode shift system in practice
The most distinctive characteristic of ITA2 is the two-mode design. With only 32 possible 5-bit combinations and 26 letters plus digits and punctuation all needed, the designers split the alphabet across two registers and used two control codes to switch between them:
- LTRS (11111): locks the machine into letters mode. Bit pattern 00001 means A in letters mode.
- FIGS (11011): locks the machine into figures mode. The same bit pattern 00001 means the digit 1 in figures mode.
The encoder on this page tracks which mode is currently active and inserts a shift marker only when the next character requires the other mode. In practice this means text that mixes letters and numbers — such as an address like “42 BAKER ST” — generates more total codes than its character count suggests, because each switch between letters and figures adds an extra code word.
Worked example
Encoding the text HELLO 42:
- Machine starts in LTRS. H encodes to
10100, E to00001, L to10010, L again, O to11000. - A space (shared across modes) emits
00100without a shift. - To encode
4, the encoder must switch to FIGS: emit11011(FIGS), then11010(4 in figures mode), then10011(2 in figures mode).
Total: 10 code words for 8 input characters, because the figures shift costs an extra marker. This overhead is why longer telex messages were usually written to keep letters and figures in separate runs where possible.
Who uses this today
The tool is used mainly by:
- Amateur radio (RTTY) operators who need to verify or debug a 5-bit Baudot stream for radio teletype transmissions.
- Retro computing enthusiasts building or simulating teleprinter hardware.
- Computer history students studying encoding systems that predate ASCII and Unicode.
- Puzzle and cipher designers who want an encoding scheme with a historical basis but less familiarity than Morse code.