Guide
Bacon’s cipher: five-letter A/B codes and hidden messages
Francis Bacon, the English philosopher and statesman, devised a cipher in which every letter becomes a group of five symbols, each either A or B. A is AAAAA, B is AAAAB, C is AAABA and so on, like counting in binary. The clever part is what Bacon did next: the A/B pattern can be hidden in an innocent-looking text, by printing it in two slightly different typefaces. The reader sees an ordinary sentence; the recipient reads the typefaces. This tool encodes and decodes the A/B code and hides messages using capital and small letters.
24 or 26 letters
Bacon’s original alphabet had 24 letters, because I and J, and U and V, were treated as the same letters in his time. In that version, I and J share the code ABAAA and U and V share BAABB. The modern 26-letter version gives every letter its own code, from A (AAAAA) to Z (BBAAB). The key table under the tool shows the codes for the alphabet you choose; use the same one as whoever made the message.
Encoding and decoding
“Text → AABBA” turns each letter into its five-symbol group, separated by spaces. “AABBA → text” does the reverse; it reads any A and B characters, ignoring spaces and anything else, so codes copied with line breaks or in lowercase still work.
Hiding a message in a sentence
Choose “Hide in a sentence”, type the secret message and a cover text. The tool writes the message’s A/B code into the letter case of the cover: a small letter means A, a capital means B. “Hi” needs ten letters of cover text, so “Francis Bacon wrote about this” becomes a sentence with an unusual pattern of capitals. Each secret letter needs five cover letters, and the tool warns you if the cover is too short. Spaces and punctuation do not count.
Revealing a hidden message
Paste a text whose capitals look oddly placed and choose “Reveal from a sentence”. Every letter is read as A (small) or B (capital) and the groups are decoded. If the result starts with readable words, you have found the message; trailing A characters come from the unused end of the cover text.
Steganography, not encryption
Bacon’s cipher hides the existence of a message rather than making it unreadable. Once someone suspects it, the code is trivial to read, so it is for puzzles, treasure hunts and history lessons. Modern steganography hides data in images and audio, but the idea is the same.
Private
Everything runs in your browser.
A worked example
In the 26-letter alphabet, B is AAAAB, A is AAAAA and C is AAABA, so “BAC” encodes as AAAAB AAAAA AAABA. Hidden in the cover text “meet me by the old oak tree”, the first fifteen letters take their case from that code: only the 5th and the 14th letters become capitals, giving “meet Me by the olD oak tree”. Paste that sentence into Reveal and the three five-letter groups decode back to BAC; the remaining small letters add only A characters at the end, which you ignore.
Related tools
Turn letters into numbers with the A1Z26 Cipher, into dots and dashes with the Morse Code Translator, reverse the alphabet with the Atbash Cipher, or find hidden characters with Invisible Character.
Checked against the current version of the Baconian Cipher on .

