Bacon's Cipher: The Hidden Messages of Francis Bacon
Francis Bacon's biliteral cipher explained — how this 1605 steganographic cipher hides messages using only two symbols and why it still fascinates today.
In 1605, the English philosopher and statesman Francis Bacon published a cipher system that could hide a secret message inside completely ordinary-looking text. The Bacon cipher (also called the biliteral cipher) encodes each letter as a sequence of five symbols using only two options — typically A and B. It's not just encryption; it's steganography — the art of hiding the very existence of a message.
What makes Bacon's system remarkable is that it predates binary computing by over 300 years, yet it works on the same fundamental principle: any information can be represented using just two states.
How the Bacon Cipher Works
Each letter of the alphabet is assigned a unique five-character code made up of only A and B. The original Bacon cipher used a 24-letter alphabet (I/J and U/V shared codes), though modern versions typically expand to 26 distinct codes.
Here's the full encoding table (24-letter original version):
| Letter | Code | Letter | Code | Letter | Code | |--------|-------|--------|-------|--------|-------| | A | AAAAA | I/J | ABAAA | R | BAAAB | | B | AAAAB | K | ABAAB | S | BAABA | | C | AAABA | L | ABABA | T | BAABB | | D | AAABB | M | ABABB | U/V | BABAA | | E | AABAA | N | ABBAA | W | BABAB | | F | AABAB | O | ABBAB | X | BABBA | | G | AABBA | P | ABBBA | Y | BABBB | | H | AABBB | Q | ABBBB | Z | BAAAA |
Each code is essentially a 5-digit binary number with A=0 and B=1, counting from 0 (AAAAA) to 25 (BAAAA for Z in the 24-letter version).
The Steganography Technique
The genius of Bacon's cipher isn't the code table — it's the hiding method. Bacon proposed using two slightly different typefaces in printed text. One typeface represents A, the other represents B. The cover text reads as normal English, but the font variations spell out the secret message.
For example, to hide the letter H (code AABBB), you'd write five characters of cover text where the first two use typeface A (regular) and the last three use typeface B (italic or slightly different):
Cover text: "BRING"
Typefaces: A A B B B
Hidden: → H
The reader sees the word "BRING." The informed recipient looks at the typeface pattern and reads AABBB = H.
A five-letter secret message requires 25 characters of cover text — you need five cover characters for every hidden letter. This makes the cover text roughly five times longer than the secret message.
Encoding Step-by-Step
Let's hide the word SECRET using Bacon's cipher.
First, convert each letter to its Bacon code:
S = BAABA
E = AABAA
C = AAABA
R = BAAAB
E = AABAA
T = BAABB
The full binary string is: BAABA AABAA AAABA BAAAB AABAA BAABB
That's 30 A/B symbols, so we need 30 characters of cover text. We write any innocent-sounding message and assign each character to A (regular) or B (bold/italic):
Cover: "THESE WORDS HIDE THINGS INSIDE"
Code: BAABA AABAA AAABA BAAAB AABAA BAABB
Each group of five cover characters encodes one secret letter.
Decoding Step-by-Step
To decode, reverse the process:
- Examine each character in the cover text and classify it as A (regular typeface) or B (alternate typeface)
- Group the A/B sequence into chunks of five
- Look up each chunk in the Bacon table
If you receive text where certain letters are bold and others aren't, that pattern of bold vs. not-bold could be a Bacon cipher. Convert bold=B and regular=A, group by fives, and decode.
The Shakespeare–Bacon Conspiracy Theory
Bacon's cipher became entangled with one of literary history's most persistent conspiracy theories: the claim that Francis Bacon secretly wrote Shakespeare's plays. In the 1880s, Ignatius Donnelly and later Elizabeth Wells Gallup claimed to have found Bacon cipher messages embedded in the First Folio of Shakespeare's works, with the hidden text supposedly revealing Bacon as the true author.
Mainstream scholars have thoroughly debunked these claims. The alleged font variations in the First Folio are normal printing inconsistencies from 17th-century typesetting, not deliberate cipher encoding. Still, the theory persists in fringe circles and has made the Bacon cipher one of the most culturally famous ciphers in history.
Bacon's Cipher and Freemasonry
Like the Pigpen cipher, Bacon's cipher has a long (if somewhat mythologized) association with secret societies. Some Masonic traditions include the Bacon cipher among their symbolic tools, partly because Francis Bacon himself has been retroactively linked to Rosicrucian and proto-Masonic organizations. Whether these connections are historical or invented, they've kept the cipher alive in esoteric literature for centuries.
The Binary Connection
Bacon's cipher is often called the ancestor of binary encoding. Each five-symbol code is functionally identical to a 5-bit binary number:
A = 0, B = 1
A (AAAAA) = 00000 = 0
B (AAAAB) = 00001 = 1
C (AAABA) = 00010 = 2
D (AAABB) = 00011 = 3
...
Modern computers use 8-bit binary code (ASCII) to represent characters, but the underlying principle is identical — every letter is a sequence of two-state switches. Bacon figured this out in 1605, centuries before Leibniz formalized binary arithmetic and long before the digital age.
Bacon's Cipher vs. Simple Binary Encoding
While related, they're not the same thing. Bacon's cipher uses 5 bits per character (enough for 32 possible values — more than enough for 26 letters). Modern binary code uses 7 or 8 bits per character to cover uppercase, lowercase, numbers, and punctuation.
The other key difference is purpose. Binary encoding is a representation system — it's how data is stored. Bacon's cipher is a steganographic system — it's how data is hidden. The encoding table is less important than the method of concealment.
How to Hide a Bacon Cipher Message Today
You don't need two typefaces. Any property that has two distinguishable states works:
- Bold vs. regular text in a document or email
- Uppercase vs. lowercase first letters of words
- Even vs. odd word lengths in a sentence
- Spaces: one space vs. two spaces between words
- Invisible characters: zero-width spaces vs. zero-width joiners in digital text
The key requirement is that the cover text must look natural to anyone who isn't in on the secret. This is what makes steganography different from ordinary encryption — an encrypted message looks like gibberish and announces that something is hidden, while a steganographic message looks like nothing at all.
Try the Bacon Cipher Online
Our free Bacon cipher tool lets you encode and decode messages using Bacon's biliteral system. Enter your plaintext to see its A/B encoding, or paste an A/B string to decode it. For identifying unknown ciphers, try our cipher decoder — it can detect Bacon-style patterns automatically.
Frequently Asked Questions
Is Bacon's cipher a substitution cipher?
Yes — each letter is substituted with a fixed five-character code. It's a substitution cipher where the substitution alphabet uses only two symbols. What makes it unique is the steganographic layer on top of the substitution.
Did Francis Bacon actually write Shakespeare's plays?
There's no credible evidence for this. The Bacon cipher "proofs" found in Shakespeare's folios have been discredited — the font variations are normal printing artifacts, not intentional encoding.
Can Bacon's cipher be used for any language?
The basic principle (encoding each character as a sequence of two symbols) works for any alphabet. You just need enough bits per character — 5 bits cover up to 32 characters, so it works for English, French, German, and other Latin-alphabet languages. Larger alphabets need longer codes.
How is Bacon's cipher different from Morse code?
Both use two primary symbols, but Morse code uses variable-length codes (1–5 symbols per letter) while Bacon uses fixed-length codes (exactly 5 symbols per letter). Morse is designed for efficient communication; Bacon is designed for hidden communication.