Cipher

Runs in your browser. Your text never leaves your device.

Bacon Cipher Encoder and Decoder

The Bacon cipher (Baconian cipher, biliteral cipher) writes each letter as five A or B symbols.

Encoding Text to Bacon code
Text
Bacon code

ABBAA AABAA AABAA BAABB /ABBA AAABA A/AAA AABAA BB/AB BABAB BBAAB BBAAB BAB

Shown in groups of five. Copy result copies it as is.

Report a wrong result or suggest a code in the Bacon Cipher tool

Recent

Nothing yet. Your last 10 conversions, across every cipher, appear here. They are kept on this device only.

Bacon Cipher at a glance

Type
Keyless cipher
Key space
None (fixed biliteral code)
Directions
Encode and decode: Text to Bacon code and back
Example
HELLO → AABBB AABAA ABABB ABABB ABBBA
Privacy
Runs in your browser, nothing is uploaded

Type your text to see its biliteral code, or paste a sequence of A's and B's to read the hidden letters back.

It was designed to be hidden inside ordinary-looking writing using two subtly different letterforms, not just to look like a code on its own. Everything runs in your browser.

How the Bacon Cipher works

Each letter is assigned a number from its position in the alphabet (A is 0, Z is 25), written as a 5-digit binary number, then each 0 is shown as A and each 1 as B. Five symbols are enough because two to the fifth power is 32, comfortably covering 26 letters.

To decode, take each group of five A's and B's, turn A back into 0 and B into 1, read the result as a binary number, and count that many places into the alphabet starting from A.

Examples

HI
AABBB ABAAA
SECRET
BAABA AABAA AAABA BAAAB AABAA BAABB
Each block of five A/B symbols is one letter.
AABBB ABAAA (decode)
hi

History and origins

Sir Francis Bacon devised the cipher around 1605 as a form of steganography: the real secret was not the A/B pattern itself but the idea of a binary code hidden inside plain text, using two visually distinct typefaces to stand for A and B. His original table used only 24 codes, sharing one code between I and J and another between U and V.

This translator uses the modern 26-letter version, where every letter from A to Z gets its own unique five-symbol code, so nothing is merged and every message decodes back exactly. It is a fitting historical footnote that Bacon's biliteral idea, spelling letters as 5-bit binary values, predates the same principle inside every modern computer by three centuries.

Frequently asked questions

Does this use Francis Bacon's original 24-letter table? #

No. The original 1605 table merges I with J and U with V. This translator uses the widely used 26-letter extension, so every letter has its own unique code and nothing is lost when you decode.

Why five letters, A or B, per character? #

Five binary digits can represent 32 different values, which comfortably covers all 26 letters of the alphabet with a few codes to spare.

Was the Bacon cipher meant to be seen? #

Not originally. Bacon's method hid the A/B pattern inside two nearly identical typefaces in an ordinary-looking cover text, so a message could pass as innocent writing. This tool shows the A/B code directly rather than the hidden typeface version.

Learn more

Go deeper on the ideas behind this tool.

Not sure this is the right tool?

If you have a message and you are not certain what it is, the cipher identifier reads the character set and the letter statistics and tells you which scheme it most likely uses, and why. It covers every code and cipher on this site.

Related translators

Reference this tool

Mention this page in homework, a write-up or an article with this line:

Bacon Cipher Encoder and Decoder on CipherPad, retrieved on the date of your visit, https://cipherpad.dev/translate/bacon-cipher

The text on this page is licensed CC BY 4.0: you may share and adapt it, also commercially, as long as you credit CipherPad and link to the page.