Bacon Cipher

Every letter becomes five As and Bs. The real trick is hiding them in plain sight.

Bacon code

How it works

Francis Bacon published this cipher in 1605. Each letter of the alphabet is written as a group of five symbols, each either A or B. That is the same idea as five bit binary, three centuries before computers: A stands for 0 and B stands for 1, and the groups count up from AAAAA.

The clever part is what comes next. The As and Bs are not meant to be sent as they are. They are hidden inside an innocent looking text by printing it in two slightly different styles, for example normal and bold, or two similar typefaces. Each letter of the cover text carries one A or B. A reader who does not know the trick sees only an ordinary sentence. Hiding the existence of a message this way is called steganography.

Bacon's original table has 24 codes, because in his day I and J were one letter, as were U and V. The modern version gives each of the 26 letters its own code. Check which one your puzzle uses if the decoded letters after I come out slightly wrong.

Worked example

In the 26 letter version, C is the third letter, so it is number 2 counting from zero: 00010, or AAABA.

Bacon cipher alphabet (26 letter version)

AAAAAA
BAAAAB
CAAABA
DAAABB
EAABAA
FAABAB
GAABBA
HAABBB
IABAAA
JABAAB
KABABA
LABABB
MABBAA
NABBAB
OABBBA
PABBBB
QBAAAA
RBAAAB
SBAABA
TBAABB
UBABAA
VBABAB
WBABBA
XBABBB
YBBAAA
ZBBAAB

Common questions

How do I hide a Bacon message in normal text?

Write a cover text five times as long as your message. Make each letter bold if its matching symbol is B and leave it plain if it is A. Any two styles work, as long as the reader can tell them apart.

What is the difference between the two versions?

The original shares one code between I and J and another between U and V, giving 24 codes. The modern version has 26.

Related tools