Home › Text Tools › Bacon Cipher

Bacon Cipher

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

  1. Pick a tab: Encode text, Decode code, Hide in text case or Reveal from case.
  2. 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.
  3. Set the two symbols if your code does not use A and B, for example 0 and 1.
  4. Type or paste your text. The result updates instantly and the key table highlights each letter used.
  5. 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.

Letter24-letter (original)26-letterLetter24-letter (original)26-letter
AaaaaaaaaaaNabbaaabbab
BaaaabaaaabOabbababbba
CaaabaaaabaPabbbaabbbb
DaaabbaaabbQabbbbbaaaa
EaabaaaabaaRbaaaabaaab
FaababaababSbaaabbaaba
GaabbaaabbaTbaababaabb
HaabbbaabbbUbaabbbabaa
IabaaaabaaaVbaabb (= U)babab
Jabaaa (= I)abaabWbabaababba
KabaabababaXbababbabbb
LababaababbYbabbabbaaa
MababbabbaaZbabbbbbaab

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.

Related tools

Polybius Square CipherEncode and decode Polybius square coordinates with a standard or keyword 5×5 or 6×6 grid.Pigpen Cipher TranslatorTurn text into pigpen cipher symbols, download a PNG, print it, or decode with a symbol keyboard.Atbash CipherEncode and decode Atbash ciphers (A↔Z, B↔Y) in Latin or Hebrew, with a live letter mapping table.Caesar CipherEncode and decode Caesar shift ciphers and crack unknown shifts with a ranked brute force.Word CounterCount words and characters and clean up text.Character CounterCount characters with and without spaces, words, lines and bytes, with live limit bars.Online Word ProcessorFree browser word processor with headings, lists, tables and images. Autosaves; export DOCX or PDF.Grammar CheckerCheck grammar, spelling and punctuation with clickable suggestions and one-click fixes.Word Count to PagesHow many pages is 1,000 words? Estimate pages by font, size, spacing and margins.Remove Line BreaksStrip line breaks and extra spaces, keep paragraphs if you want.Sort Lines AlphabeticallySort a list A-Z, Z-A, numerically, naturally or by length, or shuffle it.Case ConverterConvert text to UPPERCASE, lowercase, Title Case, camelCase and more.Citation GeneratorCreate APA, MLA and Chicago citations for books, websites and articles.MLA Format GeneratorBuild an MLA 9 heading, title page layout and Works Cited entries.Bibliography GeneratorBuild an alphabetized bibliography in APA 7, MLA 9, Chicago or Harvard style.Essay Length & Reading TimeWords to reading time, speaking time and handwritten or typed pages.Lorem Ipsum GeneratorGenerate placeholder text as paragraphs, words or lists, with HTML.Instagram Caption FormatterKeep line breaks and spacing in Instagram captions and bios.Instagram Bio GeneratorCreate Instagram bios with templates, fancy fonts and emojis.X Post Character CounterCount X (Twitter) post characters and split long text into a thread.TikTok Caption CounterCount TikTok caption characters and hashtags against the 2,200 limit.Speech Length CalculatorPaste a speech to see how long it takes to say at any speaking speed.Text to SpeechTurn text into natural-sounding speech.Fancy Text GeneratorTurn text into cool Unicode fonts for bios.Reverse Text GeneratorWrite text backwards, reverse words or lines, mirror or flip it upside down.Upside Down Text GeneratorFlip text upside down with Unicode characters, or turn it back to normal.Text RepeaterRepeat any text or emoji up to 100,000 times with custom separators.YouTube Title Length CheckerCheck YouTube title length, preview truncation and score it for clicks.YouTube Description & Chapters GeneratorBuild a YouTube description with chapters, links and hashtags from templates.Text CompareFind the differences between two texts.AI Prompt GeneratorBuild better prompts for ChatGPT, Midjourney and more.Email Signature GeneratorBuild HTML email signatures for Gmail and Outlook.Flashcard MakerMake flashcard decks and study them with flip cards and spaced repetition, saved in your browser.Find and Replace TextFind and replace words or regex patterns in any text, with match highlighting and undo.YouTube Tag GeneratorGenerate YouTube tag ideas from your title and keywords and fit them in the 500-character limit.Quiz MakerMake a multiple-choice quiz, take it with instant scoring and share it with a link.Add Line NumbersNumber every line of your text with custom start, step, padding and separator, or remove numbers.Add Prefix and Suffix to LinesAdd text to the start and end of every line: quotes, commas, bullets or SQL lists.Old English Text GeneratorConvert text to Old English Unicode letters you can copy and paste anywhere.Superscript GeneratorConvert text to superscript Unicode letters you can copy and paste anywhere.Subscript GeneratorConvert text to subscript Unicode letters you can copy and paste anywhere.Cover Letter GeneratorFill in a short form and get a tailored, editable cover letter to copy, download or save as PDF.Resignation Letter GeneratorCreate a polite resignation letter or email from templates, with your dates filled in, ready to send.Pig Latin TranslatorTranslate English to Pig Latin and back, keeping capital letters and punctuation intact.Remove PunctuationStrip all or only selected punctuation from text, with smart options for apostrophes and numbers.Text SplitterSplit long text into chunks by characters, words, lines or a delimiter, with numbering and copy.Remove Special CharactersStrip symbols, emoji and odd characters, keeping only letters, numbers, spaces and what you allow.Remove AccentsStrip accents and diacritics from text (é→e, ñ→n, ß→ss, ø→o) instantly, live as you type.Sort NumbersPull numbers out of any text and sort them ascending or descending, with sum, average and median.Spell CheckerCheck spelling online: misspelled words are highlighted with suggestions you can click to fix.Thread SplitterSplit long text into numbered X, Threads, Bluesky or Mastodon posts at sentence boundaries.Duplicate Word FinderFind repeated words in your text: doubled words like "the the" and overused words, highlighted.Emoji TranslatorTranslate text to emoji: words like love, pizza and dog become ❤️ 🍕 🐶, with a density slider.Alternating Caps GeneratorTurn text into aLtErNaTiNg caps, random caps or alternating words, then copy it.Random Paragraph GeneratorGenerate readable random English paragraphs by topic and length for writing and design.Random Sentence GeneratorGenerate random grammatical sentences: simple, compound, complex and questions.Rhyme FinderFind perfect and near rhymes for any word, grouped by syllables, for songs and poems.DictionaryLook up English word definitions with pronunciation audio, examples, synonyms and antonyms.Acronym GeneratorTurn a phrase into an acronym, or turn letters into creative backronym ideas.Markdown to Plain TextStrip Markdown syntax and keep clean plain text with lists, line breaks and link URLs.SRT to TextTurn SRT or VTT subtitles into a clean transcript with paragraphs, with or without timestamps.Transcript CleanerRemove timestamps, speaker labels and filler words like um and uh, and fix broken line breaks.WhatsApp Chat AnalyzerAnalyze an exported WhatsApp chat: who texts most, active hours, top words and emojis, privately.Extract Numbers from TextPull every number out of text: decimals, negatives and percentages, with sum, average and CSV.Extract Phone NumbersFind phone numbers in any text, normalize them to E.164, remove duplicates and export CSV.Letter Frequency CounterCount how often each letter appears, compare with English frequencies and see top bigrams.Monospace Text GeneratorTurn text into 𝚖𝚘𝚗𝚘𝚜𝚙𝚊𝚌𝚎 typewriter-style Unicode letters to copy and paste.Aesthetic Text GeneratorMake aesthetic text with vaporwave letters, sparkles, hearts and frames to copy.
See all 459 Text Tools →