Baconian Cipher
Encode and decode Bacon's bilateral cipher, turning each letter into a group of five A and B symbols. Switch between the 24-letter and 26-letter alphabets, choose A/B or 0/1 symbols, follow along on the live code table, and copy, download, or share the result. Everything runs in your browser.
Alphabet
Symbols
Classic Baconian uses 24 codes: I and J share one code, and U and V share one code, exactly as Bacon wrote it in 1605. A decoded J reads back as I, and a decoded V as U.
Enter text above to see the result here.
Baconian alphabet
A
AAAAA
B
AAAAB
C
AAABA
D
AAABB
E
AABAA
F
AABAB
G
AABBA
H
AABBB
IJ
ABAAA
K
ABAAB
L
ABABA
M
ABABB
N
ABBAA
O
ABBAB
P
ABBBA
Q
ABBBB
R
BAAAA
S
BAAAB
T
BAABA
UV
BAABB
W
BABAA
X
BABAB
Y
BABBA
Z
BABBB
How to use Baconian Cipher
- 1
Choose encode or decode
Pick Encode to turn plain text into Baconian groups, or Decode to turn groups of five A/B symbols back into letters.
- 2
Pick the alphabet variant
Choose the classic 24-letter alphabet, where I/J and U/V share a code, or the distinct 26-letter alphabet, where every letter is unique.
- 3
Choose the symbols
Show the code in Bacon's original A and B, or switch to 0 and 1 to see it as plain binary. Decoding accepts either style.
- 4
Type or paste your text
Enter your message and it is converted as you type. Encoding uses letters only, so spaces, digits, and punctuation are skipped.
- 5
Copy, download, or share
Copy the result, download it as a text file, or share a link that reopens the tool with your exact text, variant, and symbols ready to go.
Understanding the Baconian Cipher
What is the Baconian cipher?
The Baconian cipher, also called Bacon's cipher or the bilateral cipher, is a method of hiding a message that was devised by the English philosopher and statesman Sir Francis Bacon around 1605. Instead of replacing each letter with a single different letter, it replaces each letter with a group of five symbols drawn from just two letters — traditionally A and B. The word CAB, for example, becomes three five-symbol groups, one for C, one for A, and one for B.
What made Bacon's idea remarkable was not the code itself but how it could be hidden. Because every letter is spelled out using only two distinct symbols, those two symbols can be disguised as two slightly different typefaces in an ordinary-looking passage of text. A reader sees an innocent message; only someone who knows to sort the letters into two fonts can recover the five-symbol groups and read the secret. That makes Bacon's cipher one of the earliest systems of steganography — hiding the very existence of a message — as well as a cipher.
How Bacon's bilateral code works
To encode, each letter of the alphabet is given a fixed pattern of five symbols, each symbol being either A or B. Five positions, each holding one of two letters, give thirty-two possible patterns — more than enough for the twenty-six letters of the alphabet. A is written AAAAA, B is AAAAB, C is AAABA, and so on, counting upward in a steady two-symbol rhythm until Z. Spaces and punctuation have no pattern of their own, so encoding works on letters alone.
The two symbols carry no meaning by themselves; what matters is the pattern of five. This is why the scheme is called bilateral, meaning two-lettered: the whole alphabet is expressed with only an A and a B. The tool above shows the complete mapping in its alphabet table, and because each code is really a five-digit binary number in disguise, you can switch the display between A and B or 0 and 1 without changing anything about how it works.
The 24-letter and 26-letter variants
Bacon originally wrote his alphabet with twenty-four codes rather than twenty-six, because in the early seventeenth century the letters I and J were treated as one letter, as were U and V. In this classic version I and J share the code ABAAA and U and V share the code BAABB, so a decoded message may show an I where you wrote a J, or a U where you wrote a V.
The modern distinct version gives all twenty-six letters their own unique code, which removes that ambiguity and makes encoding and decoding perfectly reversible. The tool supports both: choose the classic 24-letter alphabet to match historical examples and old puzzles, or the distinct 26-letter alphabet when you want every letter to survive a round trip unchanged. The alphabet table updates to show exactly which codes the chosen variant uses.
Hiding a message in plain sight
The true cleverness of Bacon's cipher is steganographic: it lets you conceal a secret inside a longer, innocent-looking carrier message. Because each hidden letter needs five symbols, and each symbol can be represented by any letter written in one of two typefaces, you need five letters of carrier text for every one letter of the hidden message. Writing those five letters in a chosen mix of, say, a normal and an italic font spells out one five-symbol group.
Bacon called this principle omnia per omnia — anything by anything — because the carrier text can say whatever you like while secretly carrying a completely different message underneath. The two fonts need not be fonts at all: any binary distinction works, such as tall and short letters, or two different inks. This tool shows the codes openly rather than hiding them in type, which is what you want for learning, puzzles, and capture-the-flag challenges, but the underlying A/B groups are exactly what a steganographic version would conceal.
A worked Baconian example
Take the word HELLO and encode it with the distinct 26-letter alphabet. H is the eighth letter, which gives AABBB; E gives AABAA; L gives ABABB; L again gives ABABB; and O gives ABBBA. Strung together, HELLO becomes AABBB AABAA ABABB ABABB ABBBA — five groups of five symbols, one group per letter.
Reading it back is just as direct: split the symbols into groups of five and look each group up in the alphabet table. Because the same letter always produces the same group, the two L's in HELLO produce the same code twice, a small reminder that, like any simple substitution, Baconian text leaks the pattern of repeated letters. Switching the symbol style to 0 and 1 would show the very same message as 00111 00100 01011 01011 01110.
Decoding a Baconian cipher
To decode, you reverse the process: gather the symbols, divide them into groups of five, and translate each group back into its letter. Choose Decode above, pick the alphabet variant that was used to encode, and paste the ciphertext. The tool is forgiving about format — it reads A or B in either case, treats 0 as A and 1 as B so binary-style codes work too, and ignores spaces, slashes, and line breaks, so you can paste codes laid out however you found them.
Only complete groups of five are translated; a stray leftover symbol at the end is ignored, and any group that does not correspond to a letter is shown as a question mark so you can spot a transcription slip. If you are decoding with the classic 24-letter alphabet, remember that an original J comes back as I and an original V as U, because those letters shared a code in Bacon's day.
History and security of Bacon's cipher
Francis Bacon published his bilateral cipher in 1605 in The Advancement of Learning and described it more fully in the 1623 Latin edition. It later became famous far beyond cryptography: supporters of the theory that Bacon secretly wrote Shakespeare's plays spent decades hunting — unconvincingly — for Baconian ciphers hidden in the typography of the First Folio. The cipher's real legacy is conceptual, reducing the entire alphabet to a two-symbol code three centuries before computers did the same with binary.
By modern standards Bacon's cipher offers no cryptographic security. Once you recognise that a text is Baconian, decoding it is purely mechanical, because the five-symbol groups are a fixed substitution with no key. Its protection was always concealment — hiding that a message existed at all — rather than scrambling its contents. For genuinely protecting information today you should use a modern, peer-reviewed algorithm such as AES; keep Baconian for puzzles, teaching, and the pleasure of hiding words in plain sight.
Frequently asked questions
What is the Baconian cipher?
How does the Baconian cipher work?
Who invented the Baconian cipher?
What is the difference between the 24-letter and 26-letter versions?
Why does Bacon's cipher use groups of five letters?
Can you show a worked Baconian example?
How do you decode a Baconian cipher?
What does bilateral cipher mean?
How is the Baconian cipher used for steganography?
Is the Baconian cipher the same as binary?
How secure is the Baconian cipher?
Does the Baconian cipher keep spaces and punctuation?
Is my text uploaded to a server?
Related tools
Keep going with these handy tools