Zero Signup ToolsFree browser tools

Converter Tools

Bacon Cipher Encoder and Decoder

Encode and decode the Bacon (Baconian) cipher online. Pick the 24 or 26 letter alphabet, set the a and b symbols, and reveal messages hidden in letter case.

Settings

The Bacon cipher encodes each letter as five symbols from a two-letter alphabet, traditionally a and b. Reveal mode reads a message hidden in the upper and lower case of a cover text.

Mode
Alphabet

The 24-letter form is Bacon's original, where I and J share a code and U and V share a code. The 26-letter form gives every letter its own code and is the common choice for modern puzzles.

Symbol presets

Bacon alphabet (26 letters)

The five-symbol code for each letter, counting up in binary from aaaaa. Every letter has its own distinct code.

Aaaaaa
Baaaab
Caaaba
Daaabb
Eaabaa
Faabab
Gaabba
Haabbb
Iabaaa
Jabaab
Kababa
Lababb
Mabbaa
Nabbab
Oabbba
Pabbbb
Qbaaaa
Rbaaab
Sbaaba
Tbaabb
Ubabaa
Vbabab
Wbabba
Xbabbb
Ybbaaa
Zbbaab

What is the Bacon cipher?

The Bacon cipher, also called the Baconian cipher or biliteral cipher, was described by Francis Bacon in 1605. It encodes every letter of the alphabet as a group of five symbols taken from a two-letter alphabet, written here as a and b. Five binary positions give 32 combinations, more than enough for the 26 letters, and the codes simply count up in binary: A is aaaaa, B is aaaab, C is aaaba, and so on. Because it maps each letter to a fixed five-bit pattern, the Baconian cipher is really a way of writing letters in binary using two chosen symbols rather than the digits 0 and 1.

The hidden message trick

  • Bacon's real goal was steganography: hiding the fact that a message exists at all. The five a and b symbols were never written out plainly.
  • Instead, each letter of an innocent cover text was set in one of two typefaces, for example roman or italic. One typeface stood for a and the other for b, so the cover text secretly carried the five-symbol groups.
  • Reveal mode does this with letter case: it reads uppercase and lowercase letters as the two symbols, five letters per hidden letter. This is the form most often seen in capture-the-flag and puzzle challenges today.
  • Like other classical ciphers, the Baconian cipher offers no real security. It is a puzzle and teaching cipher, and a fun way to hide a short message in plain sight.

How to use

  1. Choose a mode: Encode turns text into an a and b stream, Decode turns an a and b stream back into text, and Reveal reads a message hidden in the letter case of a cover text.
  2. Pick the alphabet. Use 26 letters for distinct codes, the common choice for modern puzzles, or 24 letters for Bacon's original form where I shares a code with J and U shares a code with V.
  3. For encode and decode, set the two symbols (a and b, A and B, or 0 and 1) and choose whether encoded groups are spaced apart or run together.
  4. Type or paste your text. Encoding and decoding update instantly, and the stats show how many letters and symbols were processed and whether any symbols were left over.
  5. For Reveal, paste a cover text and pick whether upper case means a or b; flip the toggle if the hidden message looks like noise. Read the code table for any letter, then copy the result or use the swap button. Everything runs locally in your browser.

About this tool

The Bacon Cipher Encoder and Decoder works with the Baconian cipher, the biliteral cipher that Francis Bacon described in 1605. It encodes every letter of the alphabet as a group of five symbols drawn from a two-letter alphabet, written here as a and b. Five binary positions give 32 combinations, more than enough for the 26 letters, and the codes simply count up in binary from A, which is aaaaa: B is aaaab, C is aaaba, and so on, so the Baconian cipher is really a way of writing letters in binary using two chosen symbols instead of 0 and 1. The tool supports both historical alphabets. The original 24-letter form folds I and J onto one code and U and V onto one code, exactly as Bacon laid it out; the 26-letter form gives every letter its own distinct code and is the version most modern puzzles and capture-the-flag challenges use, so a single switch covers whichever variant a challenge expects. You can encode plain text to an a and b stream and choose whether the five-symbol groups are spaced apart for readability or run together, and you can change the two symbols to anything you like, including the classic a and b, upper case A and B, or the digits 0 and 1 for a plain binary view. Decoding is just as forgiving: paste an a and b stream and the tool strips out spaces, slashes, and line breaks, reads the symbols five at a time, and reports any leftover symbols that did not complete a final group. The tool also handles the part of the Baconian cipher that makes it special, which is steganography. Bacon's real goal was to hide the fact that a message existed at all, so the five a and b symbols were never written out plainly. Instead each letter of an innocent cover text was set in one of two typefaces, one standing for a and the other for b, and the reader recovered the secret by reading the typefaces five letters at a time. Reveal mode does this with letter case: paste a cover text and the tool reads each letter as a or b by whether it is upper or lower case, skips spaces and punctuation, and spells out the hidden message, with a single toggle to flip which case means which symbol if the result looks like noise. A full reference table lists the five-symbol code for every letter in the chosen alphabet, a sample is one click away for each mode so you can see a verified round trip and a real hidden-message example immediately, and a swap button feeds the output back as input to chain encode and decode. Like other classical ciphers the Baconian cipher offers no real security; it is a teaching and puzzle cipher and a fun way to hide a short message in plain sight. Everything runs in your browser, and the text you enter is never uploaded, logged, or sent anywhere.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsConverter Tools