Bacon Cipher
Hide messages with the classic Bacon cipher.
Each letter becomes a 5-character group of A and B (e.g. A = AAAAA, Z = BBBAA). Spaces between words become double spaces in the output.
The 26-letter Baconian variant is used here — each letter has a unique 5-bit code. Bacon cipher is a steganographic technique from 1605, not a security tool. Do not use it to protect sensitive information.
How to use Bacon Cipher
What this tool does
The Bacon Cipher tool converts text to and from the Baconian encoding that Sir Francis Bacon published in 1605. Every letter of the alphabet is represented by a unique 5-character sequence of the letters A and B. This tool uses the 26-letter variant, where every one of the 26 English letters has its own distinct code: A encodes as AAAAA, B as AAAAB, C as AAABA, and so on through the alphabet to Z, which encodes as BBBAA.
In encode mode, each letter in your text is replaced with its 5-character group. Groups are separated by spaces, and word boundaries become double spaces. In decode mode, the tool strips any characters that are not A or B, groups the remaining characters into blocks of five, and looks up each block in the encoding table to produce the original letter. If the number of A/B characters does not divide evenly by five, the tool shows a clear error rather than silently producing a partial or wrong result. Everything updates in real time.
Why you might need it
The Bacon cipher has a distinctive place in the history of information encoding. Bacon invented it not as a cipher in the modern sense but as a steganographic technique — a way to conceal the fact that a message exists at all. By printing a document in two slightly different typefaces, one for A and one for B, a secret message could be hidden inside an entirely innocent-looking piece of text. The reader would only discover it if they knew to look.
That steganographic tradition makes the Bacon cipher a favourite in puzzles, escape rooms and ARGs, where the two-symbol encoding can be hidden in images, binary patterns, musical notes, capital versus lowercase letters, or any other binary distinction. It also has a legitimate place in cryptography and computer science education as an early example of binary encoding — the five-bit codes map directly onto the first 26 values of a 5-bit binary system, making it a natural bridge between historical ciphers and modern computing.
How to use it
- Choose Encode to convert plain text into Baconian groups, or Decode to recover plain text from Baconian groups.
- Type or paste your text into the input box.
- In encode mode, each letter immediately becomes a 5-character A/B group in the output. In decode mode, the A/B groups are translated back to letters.
- Click Copy output to copy the result to your clipboard.
- Use Load sample to see an example, or Clear to start fresh.
Common pitfalls
When decoding, the most common problem is mismatched group sizes. Every decoded letter requires exactly 5 A or B characters. If a group is cut short — because a character was accidentally omitted — the tool will show an error asking you to check for missing characters. Count the A/B characters in groups of five: if the last group has fewer than five, a character is missing.
A second trap is forgetting that only A and B matter in the input for decoding. Spaces, separators, newlines and any other characters are stripped before grouping, so “AAAAA AAAAB” and “AAAAAAAAAB” both decode the same way. This is useful when pasting Baconian text that uses various separators, but it means a stray A or B hidden in a separator will be included in the decode — use only non-AB characters as separators to be safe.
Digits, punctuation and accented letters cannot be encoded in standard Baconian, so they are silently replaced by a space marker in the output. If you need to encode a number, write it out as a word.
Tips and advanced use
The steganographic angle is where Bacon cipher shines as a puzzle tool. Encode your secret message into Baconian groups, then conceal the A/B distinction in some other binary feature of a cover text: capitals versus lowercase, bold versus plain, short words versus long words, or any two distinct visual states. The result looks like ordinary text but carries a hidden message readable only to someone who knows to look for the pattern.
For escape rooms, the Bacon cipher works particularly well when combined with a physical prop — a piece of music where two note values encode the message, or a grid of black and white squares that a player must photograph and decode. The 5-bit structure also lends itself to patterns made from everyday objects: five items in a row, each either in state A or state B.
Since the entire tool runs in your browser, there is no risk in pasting real or unpublished text here to experiment. Nothing is stored or transmitted.
Frequently asked questions
Is my text processed on a server?
What is the Bacon cipher?
How do I decode a Bacon cipher message?
Is the Bacon cipher secure?
What happens to digits, spaces and punctuation when encoding?
Related tools
ROT13 Cipher
Encode and decode text with the classic ROT13 cipher.
Caesar Cipher
Encrypt and decrypt text with a custom Caesar shift.
Atbash Cipher
Encode and decode text with the Atbash cipher.
Vigenère Cipher
Encrypt text with the key-based Vigenère cipher.
Binary to Text
Convert 8-bit binary back into readable text.
Morse Code Translator
Translate between text and Morse code.