Skip to content
Test versionSearch

Developer tools

Bacon cipher encoder and decoder

Encode ASCII letters as five-symbol A/B groups with the Bacon cipher or decode complete groups back to letters, using a declared 26-letter variant.

How it worksFAQRelated tools

Content reviewed:

The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. Nothing is saved or sent automatically.

A–Z indices 0–25 as five bits, 0=A/1=B. Encode only ASCII letters/spaces; case and spaces are lost. Decode complete groups only; junk/residue and values 26–31 refused. Not historical 24-letter variant or font steganography. Long expansions refuse. Educational/puzzle transformations, no protection for confidential data. Input 400 UTF16 units (Caesar all mode 200), result 500 characters each; no controls or unpaired surrogates. No Unicode transliteration. Press Calculate to update the result; you can download it as TXT or CSV. JSON and HTML downloads include your inputs and the numbers as calculated. Live calculation is off unless you switch it on. Nothing is saved or sent automatically.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

Own declared arithmetic text shifts, substitutions and code-point permutations; educational only. Own structured JSON/result-row TXT/printable HTML files retain original inputs, options and result values. A–Z indices 0–25 as five bits, 0=A/1=B. Encode only ASCII letters/spaces; case and spaces are lost. Decode complete groups only; junk/residue and values 26–31 refused. Not historical 24-letter variant or font steganography. Long expansions refuse. Educational/puzzle transformations, no protection for confidential data. Input 400 UTF16 units (Caesar all mode 200), result 500 characters each; no controls or unpaired surrogates. No Unicode transliteration. Press Calculate to update the result; you can download it as TXT or CSV. JSON and HTML downloads include your inputs and the numbers as calculated. Live calculation is off unless you switch it on. Nothing is saved or sent automatically.

Worked example

With these example values the calculator gives the result below. You can change any value in the form above.

Inputs

Direction
Encode
Text or encoded input
ABC XYZ

Result

Result text
AAAAA AAAAB AAABA BABBB BBAAA BBAAB
Result code points
35

Frequently asked questions

How does the Bacon cipher encode letters?

Each letter A to Z gets its index 0 to 25 written as five bits, with 0 shown as A and 1 as B. So A is AAAAA and Z (11001) is BBAAB.

What does ABC XYZ look like in the Bacon cipher?

ABC XYZ is encoded as AAAAA AAAAB AAABA BABBB BBAAA BBAAB.

Does the Bacon cipher keep case and spaces?

No. Only ASCII letters and spaces can be encoded, and case and spaces are lost.

How does Bacon cipher decoding work?

Decoding accepts complete five-letter groups only. Junk characters, leftover residue and values 26 to 31 are refused.

Is this the historical 24-letter Bacon cipher?

No. The tool uses a declared 26-letter five-bit variant, not the historical 24-letter mapping, and it does no font steganography.