Bacon cipher encoder

Francis Bacon devised this cipher to hide messages, and it is popular in puzzles and escape rooms. It is a puzzle cipher, not protection.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter text and alphabet version.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

The letter number n in the chosen alphabet (A = 0) is written in 5-bit binary, then 0 becomes A and 1 becomes B. Example: H = 7 = 00111 = AABBB.

Example

Inputs: Alphabet version = Original 24 letters (I=J, U=V). Result: Encoded text: AABBB AABAA ABABA ABABA ABBAB / BABAA ABBAB BAAAA ABABA AAABB; Letters processed: 10.

Hello world
AABBB AABAA ABABA ABABA ABBAB / BABAA ABBAB BAAAA ABABA AAABB

Limits and caveats

  • This is a puzzle and teaching cipher that is easy to break, so never use it to protect passwords or sensitive data.
  • Digits and symbols are dropped, and words are separated by /.
  • In the original alphabet I and J share one code, as do U and V.

Questions about this tool

What is the difference between the 24 and 26-letter versions?

In Bacon's original, I and J share one code and so do U and V. The modern version gives every letter its own code.

How is the Bacon cipher hidden in normal text?

A cover text is written in two typefaces, one standing for A and the other for B, so it looks ordinary.

Can I use 0 and 1 instead of A and B?

The idea is binary, but this tool writes A and B as in the original cipher.