ForHosting KIT · Developer Utilities

Baudot ITA2 encoder

“HI” becomes 10100 00110 in Baudot–Murray ITA2, the five-bit teleprinter code of Telex and radio teletype, with letter and figure shifts inserted automatically and any symbol ITA2 cannot carry listed for you. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Text
HI
Calculation mode
Encode
You get
Result
10100 00110
Encoding
baudot-ita2
Codes
20, 6
Code count
2

Baudot–Murray code, standardized as International Telegraph Alphabet No. 2 (ITA2 or CCITT-2), is the five-bit teleprinter alphabet that carried news wire, Telex, and radio teletype traffic for most of the twentieth century. Unlike Morse, every character occupies a fixed five-bit frame, and the same code number means a letter or a figure depending on whether the stream last selected letter shift (LTRS) or figure shift (FIGS). Students of coding history, radio amateurs restoring RTTY gear, CTF solvers, and documentation tools all need a deterministic converter that inserts those shifts correctly, maps A–Z and the classic figures set, and reports any character that ITA2 simply cannot represent. This capability encodes plain text into space-separated five-bit groups, decodes binary, decimal, or hex token streams back to text, and lists unmapped glyphs so you never silently lose a symbol.

What Baudot–Murray ITA2 is and how letter and figure shifts work

ITA2 is a five-bit character set with thirty-two possible values. Five of those values are shared controls or shifts rather than printable glyphs: NULL (blank), line feed, carriage return, FIGS (switch to figures case), and LTRS (switch to letters case). The remaining codes are interpreted through the current case.

In letter case you get A–Z and space; in figure case the same numeric codes produce digits and punctuation such as 3, -, ', 8, 7, 4, comma, exclamation, colon, parentheses, 5, plus, 2, hash (or the pound-sterling cell), 6, 0, 1, 9, question mark, ampersand, period, slash, and semicolon. Teleprinters power up in letter case, so encoders start in LTRS and emit a FIGS code only when the next character requires figures, then emit LTRS again when letters resume.

Shared symbols—space, CR, and LF—are valid in both cases and do not force a shift. Decode starts in letter case, updates state on LTRS and FIGS tokens, ignores NULL, and prints the character from the active table. WRU and BEL figure cells have no ordinary printable form and are reported as unmapped code labels rather than inventing private glyphs.

Classroom ITA2 and teleprinter history labs

Let students encode short messages, inspect automatic LTRS/FIGS insertions, and decode their own bit streams to confirm the five-bit shift model.

RTTY and vintage Telex tooling

Generate deterministic ITA2 five-bit groups for radio teletype drills, museum demos, and restoration notes without a mechanical keyboard.

CTF and classical encoding challenges

Decode five-bit Baudot dumps and re-encode answers with the same shift rules used by teaching tables and wire-format write-ups.

What is Baudot–Murray ITA2?

ITA2 (CCITT-2) is a five-bit teleprinter alphabet. Codes 0–31 mean different characters depending on letter shift (LTRS) or figure shift (FIGS). This tool encodes and decodes that alphabet with automatic shift insertion.

How do letter and figure shifts work?

Streams start in letter case. When a digit or figures punctuation is needed, a FIGS code (11011) is emitted first; when letters resume, a LTRS code (11111) is emitted. Space, CR, and LF work in both cases without forcing a shift.

What formats can I use when decoding?

Space-separated 5-bit groups (e.g. 00011 00101), decimal 0–31, hex 0x00–0x1f, or a continuous binary string whose length is a multiple of 5.

Which characters cannot be written in Baudot ITA2?

ITA2 covers A to Z, the digits, space, carriage return, line feed and a small set of punctuation such as - ' ! , ( ) : + / ? & . ; # and £. Lowercase letters are turned into capitals; anything else is skipped and listed, so no symbol disappears without notice.

Why does my encoded message contain 11011 or 11111?

Those are the shift codes: 11011 switches to figures and 11111 switches back to letters. They are added automatically whenever the message moves between letters and digits or punctuation. A text made only of letters, like HI, needs no shift at all.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/enc/baudot

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/enc/baudot \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"HI"}'
{
  "text": "HI"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.baudot",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What Baudot–Murray ITA2 is and how letter and figure shifts work

This endpoint follows that classic state machine: encode walks each character, uppercases Latin letters, inserts LTRS or FIGS when the required case differs from the current case, and appends the five-bit pattern for the character.

Input contract, output fields, and how unmapped characters are reported

For encode, text is ordinary plain text; for decode, text is a stream of ITA2 codes. Encode accepts A–Z in either case, digits zero through nine, space, carriage return, line feed, and the figures punctuation set including hyphen, apostrophe, comma, exclamation, colon, parentheses, plus, question mark, ampersand, period, slash, semicolon, hash, and the pound sign. Decode accepts space-separated five-bit groups such as 00011, decimal integers from zero to thirty-one, hex tokens like 0x03, or a continuous binary string whose length is a multiple of five. POST a JSON body with required string field text. Optional mode defaults to encode and also accepts decode, plus short aliases such as enc, e, to_baudot, dec, d, and from_baudot. Field aliases for the payload include input, value, data, s, message, plaintext, and ciphertext so scripts can reuse existing shapes. Any other character—at-signs, percent, emoji, accented letters outside the ITA2 alphabet—is skipped, recorded once in first-seen order in the unmapped array, and counted in unmapped_count while mapped characters still produce codes. If nothing in the string is mappable, the task fails with invalid_input instead of returning an empty success. Malformed tokens, out-of-range decimals, and continuous binary of non-multiple length fail with invalid_input and are not billed. On success the body includes result (binary groups on encode, plain text on decode), mode, encoding set to baudot-ita2, codes as an array of integers zero through thirty-one including any shift codes inserted, code_count, mapped, unmapped, unmapped_count, shift_count, input_length, output_length, and a short formula string restating the ITA2 shift rule. Successful API calls use the published base price of $0.002 per item; validation failures do not consume balance.

Where a Baudot ITA2 encoder earns its keep in practice

History-of-computing and coding-theory courses use a Baudot ITA2 encoder so students can see why five bits plus two shift codes can cover letters and figures without a sixth bit, then reverse a hand-built stream and check their shift insertions. Amateur radio and vintage Telex restoration projects need a deterministic oracle that produces the same bit groups a mechanical teleprinter would have selected for a given message, including automatic FIGS before a digit run and LTRS when letters resume. Documentation and museum exhibit software generate labeled examples for captions without standing up a full RTTY modem stack. Capture-the-flag and classical-crypto challenges sometimes hide flags in ITA2 binary or decimal dumps; solvers need both directions and a clear invalid_input when a token is not a legal five-bit group.

What happens to characters ITA2 cannot represent?

On encode they are skipped and listed once each in the unmapped array (with unmapped_count). Mapped characters still produce codes. If nothing maps, the request fails with invalid_input.

What does the Baudot ITA2 encoder cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →