Baconian Cipher
Steganographic 5-bit cipher invented by Francis Bacon.
Overview
Francis Bacon's cipher encodes each letter of the alphabet as a five-character sequence of two symbols — traditionally "A" and "B", though modern implementations often use "0" and "1". The clever part is that the symbols can hide inside something else: italic vs. roman type, capitalized vs. lowercase letters, or two different fonts in a cover text.
This makes Baconian both a cipher and a form of steganography. Cryptography enthusiasts, history buffs studying Elizabethan cryptology, and puzzle designers building hidden-message challenges all reach for it when they want a code that can be smuggled inside ordinary-looking writing.
How it works
Each letter maps to a 5-bit pattern, giving 32 possible codes — enough to cover the 26-letter alphabet with room to spare. The original 17th-century scheme treated I/J and U/V as single letters; modern variants assign every letter its own code. To encode, look up each plaintext letter and emit its 5-symbol group.
Worked example: "HI" — H is AABBB and I is ABAAA, so "HI" encodes as AABBBABAAA.
Examples
Input: CAT
Output: AAABA AAAAA BAABA
Input: BACON
Output: AAAAB AAAAA AAABA ABBAB ABBBA
Input (decode): AABBB ABAAA
Output: HI
FAQ
Why two symbols?
Bacon wanted a code that could ride on top of any binary distinction — italic vs. roman text, two slightly different fonts, even drumbeats or knocks. Anything you can vary in pairs is enough.
Is this the same as Bacon's biliteral cipher?
Yes. "Baconian", "Bacon's cipher", and "biliteral cipher" all refer to the same scheme published in 1605.
How is it different from binary ASCII?
ASCII uses 7 or 8 bits per character and covers digits and punctuation. Baconian uses exactly 5 bits and only encodes letters.