Baconian Cipher
Encode and decode messages with the Baconian cipher.
Result
How it is calculated
The Baconian cipher replaces each letter with a group of five symbols, a or b. In this 26-letter version the letter's position in the alphabet counted from 0 (A = 0, B = 1 … Z = 25) is written as a 5-bit binary number, with 0 as a and 1 as b. So A = aaaaa, B = aaaab and Z = bbaab.
When encoding, the text is made uppercase, letters within a word are separated by one space and words by two spaces; digits, punctuation and accented letters are skipped. When decoding, only a and b (any case) are read, everything else is ignored, and the symbols are cut into groups of five from the start. A group whose value is above 25 is dropped, and a leftover group shorter than five is ignored. The original I/J and U/V merged variant is not used.
Worked example
Encode Hello. H is letter number 7, which is 00111 in binary, so aabbb. E is 4, 00100, so aabaa. L is 11, 01011, so ababb, and it appears twice. O is 14, 01110, so abbba. Joined with spaces the result is aabbb aabaa ababb ababb abbba.
Common mistakes
- Counting the alphabet from 1 instead of 0. A must be
aaaaa, notaaaab, or every letter shifts by one. - Decoding text that uses the historic 24-letter table, where I/J and U/V share a code. Those messages will decode with some wrong letters here.
- Breaking the a/b string into groups of the wrong size or dropping one symbol; every later letter is then misread.
- Expecting digits or punctuation to be encoded. They are skipped, so they vanish from the message.
About this calculator
This tool encrypts or decrypts text with the Baconian cipher, devised by Sir Francis Bacon, which represents each letter as a unique 5-character sequence of "a" and "b" (essentially a 5-bit binary code, e.g. A = aaaaa, B = aaaab). Its original power was as a steganographic device: the a/b sequence could be hidden in an innocuous cover text using two subtly different typefaces or formats, so the message stayed invisible unless you knew to look.
Cryptography students and puzzle designers use it today to explore early binary encoding and steganography, and to hide messages inside seemingly ordinary text. Enter your text to encode it into a/b groups, or paste a/b (or two-symbol) sequences to decode them back to letters.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)