Skip to content
All tools
Classical cryptoRuns locallyNo account

Bacon cipher decoder

Decode Baconian ciphers, including the versions hidden in letter case, font changes, or two repeated symbols.

Open in ctfpal

Bacon encodes each letter as five binary symbols, traditionally A and B. What makes it interesting is that the two symbols do not have to be letters at all - they can be uppercase versus lowercase, roman versus italic, or two arbitrary characters. Bacon is a cipher that doubles as steganography.

That dual nature is what makes it worth recognising rather than merely decoding. If you have found a Bacon cipher you have usually also found the hiding place, because the carrier - the sentence with strange capitalisation, the paragraph in two fonts - was itself the message. Groups of exactly five symbols drawn from a two-element set is the signature to watch for, whatever those two elements happen to be.

The hidden variants

  • Case encoding. A sentence of ordinary English where the capitalisation looks wrong. Uppercase is one symbol, lowercase the other.
  • Vowel/consonant encoding. Any two-way split of the alphabet works; vowels-versus-consonants is common.
  • Two repeated characters. Long runs of just two distinct symbols in groups of five.
  • Typography. In a PDF or image, bold versus regular. Recover the pattern manually, then decode.

Worked example

Literal A/B Bacon

Input

ABBBB ABAAA AAABA ABBBA AAABA BAABB AABAB

Result

PICOCTF (five-symbol groups, 26-letter variant)

Groups of exactly five with only two distinct symbols is the signature. Read with the 24-letter table instead it decodes to `QICPCUF`, which is what picking the wrong variant looks like.

Load this example in the workspace

Related tools