CipherWiz

Bacon Cipher Encoder and Decoder

Encode and decode the Baconian cipher. Each letter is five A or B symbols. Choose the original 24-letter or the 26-letter alphabet, A/B or 0/1.

How it works

Francis Bacon's cipher writes each letter as a group of five symbols, each either A or B. The groups are the letter's position in the alphabet written in binary, with A for 0 and B for 1: A is AAAAA, B is AAAAB, C is AABAA, D is AAABB and so on. Bacon's original alphabet from 1605 has 24 letters, because I and J share a code, and so do U and V. The modern 26-letter version gives every letter its own code, so letters from J on have different codes in the two versions. When encoding, letters are written as groups separated by spaces and words are separated by a slash; digits and punctuation are dropped. When decoding, everything except A and B (or 0 and 1) is ignored, the symbols are read five at a time, and a slash starts a new word. Bacon meant the two symbols to be hidden in an innocent text, for example as two typefaces, so the message is not visible at all.

Example: in the 24-letter version, HI BOB becomes AABBB ABAAA / AAAAB ABBAB AAAAB.

Bacon cipher alphabet

Codes of each letter in both versions. They differ from J onwards.

Letter24 letters26 letters
AAAAAAAAAAA
BAAAABAAAAB
CAAABAAAABA
DAAABBAAABB
EAABAAAABAA
FAABABAABAB
GAABBAAABBA
HAABBBAABBB
IABAAAABAAA
JABAAAABAAB
KABAABABABA
LABABAABABB
MABABBABBAA
NABBAAABBAB
OABBABABBBA
PABBBAABBBB
QABBBBBAAAA
RBAAAABAAAB
SBAAABBAABA
TBAABABAABB
UBAABBBABAA
VBAABBBABAB
WBABAABABBA
XBABABBABBB
YBABBABBAAA
ZBABBBBBAAB

Hiding a Bacon message in plain text

Bacon's idea was steganography: write any innocent sentence and use two typefaces, for example normal and bold letters, so that normal means A and bold means B. Every five letters of the cover text carry one letter of the secret. To read such a message, write A or B under each letter of the cover text and paste the A/B string here.

Frequently asked questions

How do I decode a Bacon cipher?

Choose Decode and paste the A and B groups. If the result looks wrong from the letter J onwards, switch between the 24-letter and 26-letter alphabet.

What if the message uses other symbols, not A and B?

Any two kinds of things can stand for A and B: bold and normal letters, upper and lower case, 0 and 1. Rewrite them as A and B (or 0 and 1) and paste them here.

Which alphabet should I use?

Use 24 letters for historical texts and most older puzzles, and 26 letters when every letter, including J and V, must decode separately.

Is the Bacon cipher binary code?

Each group is a 5-bit binary number with A for 0 and B for 1, so it is closely related. Computer binary for letters uses 8-bit bytes instead; see the binary translator for that.

Who was Francis Bacon?

An English philosopher and statesman who described this cipher in 1605 and published it in 1623 as a way to hide a message inside another text.

Is my text sent to a server?

No. Everything runs in your browser and the text you type is not sent anywhere.

More text tools

Bacon's cipher is a historical code for puzzles and learning, not for real secrets.