Turn text into Francis Bacon's two-symbol code (A = aaaaa, B = aaaab …) or decode A/B, 0/1 and dot/dash versions back into letters. You can also hide a secret in the upper and lower case of an ordinary sentence and reveal it again.
Last updated:
/
Bacon alphabet (24 letters)
Letters in your message are highlighted.
Advertisement
Advertisement
How to use the Bacon Cipher
Pick a tab: Encode text, Decode code, Hide in text case or Reveal from case.
Choose the alphabet: the original 24-letter version (I/J and U/V share a code) or the 26-letter version. Both sides must use the same one.
Set the two symbols if your code does not use A and B, for example 0 and 1.
Type or paste your text. The result updates instantly and the key table highlights each letter used.
Copy the result or send it to the opposite mode to check that it decodes correctly.
How the Baconian cipher works
Each letter becomes a group of five symbols of two kinds, A and B. In the 26-letter version the group is simply the letter's position written in binary, with A for 0 and B for 1: H is position 7, which is 00111 in binary, so it becomes aabbb. The word HI becomes aabbb abaaa.
Bacon's original alphabet has only 24 codes because I/J and U/V were each treated as one letter. Up to H both versions match; from I onward the codes differ by one or two places, which is the most common reason a decoded message looks wrong.
Letter
24-letter (original)
26-letter
Letter
24-letter (original)
26-letter
A
aaaaa
aaaaa
N
abbaa
abbab
B
aaaab
aaaab
O
abbab
abbba
C
aaaba
aaaba
P
abbba
abbbb
D
aaabb
aaabb
Q
abbbb
baaaa
E
aabaa
aabaa
R
baaaa
baaab
F
aabab
aabab
S
baaab
baaba
G
aabba
aabba
T
baaba
baabb
H
aabbb
aabbb
U
baabb
babaa
I
abaaa
abaaa
V
baabb (= U)
babab
J
abaaa (= I)
abaab
W
babaa
babba
K
abaab
ababa
X
babab
babbb
L
ababa
ababb
Y
babba
bbaaa
M
ababb
abbaa
Z
babbb
bbaab
Hiding a message in plain sight
Bacon designed his cipher as steganography: the A/B pattern is carried by an innocent text rather than written out. He suggested printing the cover text in two very similar typefaces. Today the easiest carriers are:
Letter case: lowercase = A, uppercase = B (what the Hide tab does). "tHe WEAther" reads as aba bbbaaaa…
Bold or italic: plain letters = A, bold letters = B in a printed puzzle.
Two kinds of objects: heads/tails, black/white beads, short/long knocks, or two fonts on a poster.
Every secret letter needs five cover letters, so a 6-letter secret needs a cover text with at least 30 letters. Spaces and punctuation in the cover text are ignored. When there is room, this tool also capitalizes five letters right after the message (the pattern bbbbb, which is not a letter in either alphabet) so the reader knows where the secret ends.
Tips for puzzle makers and solvers
Text that only contains two different symbols in multiples of five is a strong hint for a Bacon cipher.
If the decoded text is nonsense, swap which symbol means A and B, then try the other alphabet.
Tell solvers which alphabet you used, or stick to letters A–I, which are identical in both versions, for a gentle first clue.
Frequently asked questions
What is the Bacon cipher?
The Bacon (Baconian) cipher was devised by Francis Bacon around 1605 and published in 1623. Each letter is replaced by a group of five symbols that are each one of two kinds, written as A and B. For example A = aaaaa, B = aaaab and C = aaaba. Because only the pattern matters, the two kinds can be any pair of things: two letters, two fonts, upper and lower case, or 0 and 1.
What is the difference between the 24-letter and 26-letter Bacon alphabet?
Bacon's original alphabet has 24 codes because I and J share one code (abaaa) and U and V share another (baabb), as was common in the Latin alphabet of his time. The 26-letter version gives every letter its own code, which makes it identical to writing each letter's position (A = 0 to Z = 25) as a 5-bit binary number. From J onward the two versions differ, so you must decode with the same version that was used to encode.
How do I decode a Bacon cipher?
Split the code into groups of five symbols, decide which symbol stands for A and which for B, and look each group up in the key table. If the result is gibberish, try swapping A and B or switching between the 24 and 26-letter alphabets. This decoder ignores spaces and line breaks, and marks groups that do not exist in the chosen alphabet with a question mark.
How do you hide a message in a sentence with the Bacon cipher?
Encode the secret as A/B symbols, then write an ordinary cover sentence where each letter shows one symbol: here lowercase means A and uppercase means B. You need five cover letters for every secret letter. Bacon himself used two slightly different typefaces instead of case, which is why this is called steganography: the message is hidden, not just scrambled.
Is the Bacon cipher secure?
No. It is a simple substitution with a fixed public table, so anyone who recognizes the five-symbol pattern can decode it in minutes. It is great for puzzles, escape rooms, treasure hunts and teaching binary, but it should never be used to protect real secrets.
Why does my code include numbers or punctuation that disappeared?
The Baconian alphabet only covers letters. Digits and symbols have no code, so the encoder skips them and tells you how many were dropped. Spell numbers out (for example 'seven') if they matter.
Is the Bacon cipher the same as binary?
The 26-letter version is exactly 5-bit binary with A = 0 and B = 1: the letter at position n (A = 0) is n written in binary with five digits. Five bits give 32 possible patterns, so 6 (or 8 in the 24-letter version) patterns are unused.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.