What the Bifid cipher is
The Bifid cipher is a pencil-and-paper code from 1901, made by the French soldier Felix Delastelle. It mixes two old ideas: the Polybius square, where each letter sits in a 5 by 5 grid and gets a row and column number, and fractionation, where those numbers are split apart and put back together in a new order. The result is a code where the same letter can come out as different letters, which makes it much harder to crack than a simple swap code.
The square holds 25 letters, so I and J share one cell, and J is always read as I. Your keyword fills the first cells of the square, in order, without repeats, and the rest of the alphabet fills the rest. Change the keyword, and the whole square changes, so the same message comes out different. The period sets the block size: the message is split into blocks of that many letters, and each block is mixed on its own.
How to use the encoder and decoder
Type a keyword, like BIFID, then type your message, like HELLO, and set the period, like 5. Press Encrypt, and the tool shows the cipher text and the square it used. Press Decrypt to turn cipher text back into plain text with the same keyword and period. The tool updates as you type, so you can watch the output change as you change the keyword or the period.
Only letters count: spaces and punctuation are dropped, and J becomes I. The output keeps the same length as the letters you typed. To send a message to a friend, agree on the keyword and the period first, then send only the cipher text. Your friend types the same keyword and period, presses Decrypt, and reads the message.
Worked example
Take the keyword BIFID. The square starts with B, I, F, D, then the rest of the alphabet without J: row one is B I F D A, row two is C E G H K, row three is L M N O P, row four is Q R S T U, and row five is V W X Y Z. Take the message HELLO with a period of 5. H is row 2 column 4, E is row 2 column 2, L is row 3 column 1, L is row 3 column 1 again, and O is row 3 column 4.
Write the rows first, 2 2 3 3 3, then the columns, 4 2 1 1 4, and read the numbers off in pairs: 22 is E, 33 is N, 34 is O, 21 is C, and 14 is D. So HELLO becomes ENOCD. Decrypting ENOCD with the same keyword and period gives HELLO back. A short message, AB with a period of 2, becomes BV, which shows how even two letters are mixed.
Who uses this cipher
Puzzle makers use it most, for treasure hunts, escape rooms, and classroom games, because it is easy to explain and hard to solve by eye. Teachers use it to show how fractionation works, and why a code that changes each letter is stronger than one that swaps each letter for one fixed other letter. History fans use it to try the codes that soldiers and spies used before computers.
It also helps anyone learning about codes in general. The Bifid sits halfway between a child’s swap code and a modern cipher: it is simple enough to do by hand, but it already uses the idea of mixing numbers that modern ciphers use on a far bigger scale. Trying it by hand teaches that idea better than reading about it.
Honest limitations
This is a toy cipher, not a way to keep real secrets. A computer can break a Bifid message in seconds, and a skilled code breaker can do it by hand with enough text. Never use it for passwords, private messages, or anything that must stay secret.
The tool also drops spaces and punctuation, and it treats J as I, so a message with a J comes back with an I in its place. Long messages are split into blocks by the period, and a period of 1 does no mixing at all, so it is the same as a plain square code. The square shown under the result is the one the tool used, so check it if a decode looks wrong.
Frequently asked questions
Why does J become I? The square has 25 cells and the alphabet has 26 letters, so two letters must share a cell. By tradition, I and J share, because they look alike and J is rare in English. The reader works out from context which one was meant.
What does the period do? It sets the block size. A period of 5 mixes the message in blocks of 5 letters, and a period of 10 mixes blocks of 10. A longer period mixes more letters together, which makes the code harder to crack, but the keyword still matters more.
Can I decode a message without the keyword? Not with this tool. The square comes from the keyword, so a wrong keyword gives a wrong square and a wrong answer. You must know the keyword and the period the sender used.
También disponible en español: Codificador De Cifrado Bifid – Fracciona Tu Mensaje
