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. The letter's position in the table, counted from 0, is written as a 5-bit binary number, with 0 as a and 1 as b. Bacon's 24-letter table (the default, as printed by the American Cryptogram Association) has no separate J or V: I and J are both abaaa, U and V both baabb, so K = abaab, W = babaa and Z = babbb. The 26-letter variant gives every letter its own code, A = 0 … Z = 25, so Z = bbaab. A to I are the same in both tables.
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, and in the 24-letter table J is written as I and V as U. 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 with no letter in the chosen table (above 23, or above 25 in the 26-letter variant) is dropped, and a leftover group shorter than five is ignored. In the 24-letter table the decoded text shows I for I or J and U for U or V.
Worked example
Encode Hello with Bacon's 24-letter table. Counting from A = 0 with J left out (it shares I's code): H is 7, which is 00111 in binary, so aabbb. E is 4, 00100, so aabaa. L is 10, 01010, so ababa, and it appears twice. O is 13, 01101, so abbab. Joined with spaces the result is aabbb aabaa ababa ababa abbab. In the 26-letter variant L is 11 and O is 14, giving aabbb aabaa ababb ababb abbba.
Common mistakes
- Decoding with the wrong table. From J onward the 24-letter and 26-letter tables give different codes, so a message written in one comes out with wrong letters in the other.
- Expecting J or V back after decoding Bacon's table. They share codes with I and U, so read I as I or J and U as U or V.
- Counting the alphabet from 1 instead of 0. A must be
aaaaa, notaaaab, or every letter shifts by one. - 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.
Sources
- ACA Cipher Types: Baconian (24-letter table, I/J = abaaa, U/V = baabb; worked examples) — American Cryptogram Association
About this calculator
This tool encrypts or decrypts text with the Baconian cipher, devised by Sir Francis Bacon, which writes each letter as a 5-character sequence of "a" and "b" (in effect a 5-bit binary code, e.g. A = aaaaa, B = aaaab). Bacon's own table has 24 letters: I and J share one code (abaaa), as do U and V (baabb). That is the table the American Cryptogram Association prints, and the tool uses it by default; a 26-letter variant that gives every letter its own code (A = 0 … Z = 25 in binary) can be chosen instead. From J onward the two tables give different codes, so decode a message with the table it was written in. 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. The tool works in both directions, turning text into a/b groups and a/b or two-symbol sequences back into letters.
Was this helpful?
You can pick up to 3 reactions.
Comments
- Be the first to comment.
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
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm's Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Note from the editors
This tool now offers two tables. The default is Bacon's own 24-letter one, as the American Cryptogram Association prints it. From the letter J on the two tables differ, so pick the one the message was written in. Digits, punctuation and non-English letters like ş are skipped when encoding. Jack comes out as abaaa aaaaa aaaba abaab in the default table, so its first group is also the code for I. Have a puzzle that fails? Paste it.