Baconian Cipher
This baconian cipher writes HELP as aabbb aabaa ababa abbba in five-letter A and B groups, or hides those groups in the capital letters of a sentence.
Input
0 of 5,000 characters (code points).
Encoded on the 24-letter alphabet
Type some text first.
Why use this Baconian Cipher?
Both Alphabets, One Tool
The 24-letter table merges I with J and U with V. The 26-letter table gives every letter its own code. Switch between them and the page names the alphabet it used.
The Cover-Text Mode
Paste a sentence and the message is hidden in which letters are capitals. Anyone who reads the sentence sees a sentence, not a cipher.
Decoding That Forgives Formatting
a, A and 0 count as A; b, B and 1 count as B. Spaces and line breaks are ignored, so text copied out of a document still decodes. Any other character is skipped and counted.
What is Bacon's Cipher?
Bacon's cipher, also called the Baconian cipher, was devised by Francis Bacon in 1605. Each letter of the message is replaced by a group of five letters, each an A or a B, which makes it a 5-bit binary code written in letters. The classic table has 24 entries because two pairs of letters share a code: I with J, and U with V. A second version gives all 26 letters their own groups, so the two tables agree up to I and differ from J onward.
The point of the cipher is not the A and B letters, which are easy to spot. It is steganography: concealing a message in the presentation of text rather than in its content. Anything with two states can carry the groups, such as two typefaces or two letter cases, and the capital-letter mode on this page uses case. That is why the cipher is listed both as a substitution cipher and as a concealment cipher. If you want ordinary 8-bit binary for text instead of five-letter groups, use the binary translator.
Which Variant This Page Uses
- 24-letter alphabetI and J share one code and U and V share one code, so A is aaaaa and Z is babbb. HELP is aabbb aabaa ababa abbba.
- 26-letter alphabetEvery letter has its own code. A is aaaaa and Z is bbaab. HELP is aabbb aabaa ababb abbbb.
- Letter caseEncoding ignores case, and decoding returns upper case letters. Restore case by hand where it matters.
- Pass-throughSpaces and line breaks are skipped. Digits, punctuation and letters outside A to Z are dropped, and the page counts them.
- Decodinga, A and 0 read as A; b, B and 1 read as B. Spaces and line breaks are skipped, every other character is skipped and counted, and the rest is read in groups of five.
- Cover-text modeEach letter of the cover text carries one bit: a capital is B and a lower-case letter is A. With the message HI and the cover "the cat sat on the mat" the result is thE CAt Sat o. The cover text needs at least 5 letters for each letter of the message, and it is cut after the last letter that carries a bit.
- Reading a cover textSwitch on the reading option in Decode mode. Capitals read as B and lower-case letters as A. Only the letters A to Z count, so spaces, digits and punctuation carry no bit.
- LimitsUp to 5000 code points of message, 5000 code points of cover text and 30000 code points when decoding. Over a limit the page refuses the input and says so before doing any work.
- Saved inNothing is saved. Reloading the page clears the text.
- Not includedOutput in two typefaces, image export and any claim about hidden messages in historical documents.
Common Use Cases
Classroom Cryptography
Show a class that a message can ride on the capitals of an innocent sentence, then have them decode one you wrote.
Puzzle Hints in Plain Text
Hide a hint inside the flavor text of a puzzle, so it is there only for someone who knows to look at case.
Geocache and Trail Clues
Paste a description and let the capitals carry a short clue.
Learning Steganography
Compare the plain A and B output with the cover-text output to see the difference between hiding a message and hiding its existence.
Checking a Puzzle Answer
Decode a group string from a book or a worksheet and confirm the answer letter by letter.
Comparing the Two Alphabets
Encode one word under both tables and see exactly which letters move.
How to Encode and Decode
Choose the alphabet
24 letters merges I with J and U with V. 26 letters gives every letter its own group.
Type the message
Text appears as five-letter groups beside the input. Characters outside A to Z are dropped, and the page says how many.
Or hide it in a cover text
Switch on the cover option, paste a sentence, and the capitals carry the bits. The page reports how many cover letters were used.
Decode anything back
Paste groups, or a mixed-case sentence with the reading option on, and press Decode. The page ignores separators and reads a, A and 0 alike, and b, B and 1 alike.
What the Output Gives You
Groups You Can Read Aloud
Each letter is five A or B letters, which is easy to dictate and easy to check.
A Sentence That Looks Innocent
Cover mode returns ordinary text with some capitals, which is what concealment is for.
No Silent Drops
If characters are skipped because they are outside A to Z, the page tells you the count.
Case Restored by Hand
Decoded text is upper case; copy it into a document and fix case once.
Copy and Compare
Copy either alphabet's output and compare it with your own table.
Tips for Baconian Cipher Work
- •Say which alphabet you used Under the 24-letter table a decoded I may have been a J, and a decoded U may have been a V.
- •Count fives A group is exactly five letters, so a run of 37 letters is not a multiple of five and something was lost.
- •Mind the cover length Five cover letters per message letter. A 20-letter message needs 100 letters of cover text.
- •Do not use it for secrets The A and B pattern is visible on sight. Use it for puzzles.
- •Keep the case In cover mode, any editor that changes case destroys the message. Paste into plain text first.
- •Punctuation is free It carries no bits, so you can punctuate the cover sentence however you like.
Try a Short Message
Type a word above and read its five-letter groups, then switch to Decode and paste them back. Everything runs in this browser and nothing you type is sent anywhere.
For a different kind of table, try the polybius square for two digits per letter, or the a1z26 cipher for letter numbers without a grid.
Related tools
Polybius Square Cipher
A Polybius square with the grid drawn beside your text, a keyed square, a 6x6 mode for digits and a decoder that ignores separators.
Binary Translator
Read or write binary with UTF-8, 7 or 8 bits.
A1Z26 Cipher
Decode a letter number puzzle and see invalid numbers.
Morse Code Translator
Encode or decode Morse code messages.
Frequently Asked Questions
Why do I and J share a code?
Five A or B letters make 32 groups. The classic table uses 24 of them, giving I and J one group and U and V one group. The 26-letter option uses 26 groups, so every letter is kept apart.
Can I decode a message hidden in someone else's text?
Only if it uses letter case. Switch to Decode, turn on the reading option and paste the whole text: capitals read as B and lower-case letters as A, five letters per message letter. Text that has been changed to one case has lost the message.
How many cover letters do I need?
Five for every letter of the message, not counting spaces and punctuation. A 12-letter message needs 60 cover letters. The page shows both counts and refuses a cover text that is too short.
Is the 26-letter alphabet the same table?
No. The two tables agree from A to I and differ for every letter from J to Z, so a message with J, K or any later letter reads differently under the wrong one. Pick the one your puzzle uses.
Does this page use two fonts?
No. It uses letter case, because case survives copy and paste into plain text. Bacon described two typefaces, and a document that mixes two typefaces can hide a message the same way.