UTILS.
100% in-browser
🔀

Bifid Cipher Encoder / Decoder

Encrypt or decrypt text with Delastelle's Bifid cipher, a fractionating Polybius-square cipher with a configurable keyword and period; key square shown.


    

I and J share one cell; J is treated as I.

output

About this tool

The Bifid Cipher, invented by Félix Delastelle around 1901, combines a Polybius square with fractionation and transposition so that each output letter depends on two different input letters — spreading, or diffusing, information across the message. This tool builds a keyed 5x5 Polybius square (I and J share a cell), shows it, and encodes or decodes your text in the browser.

Each plaintext letter is first written as a coordinate pair — its row and its column in the square. The text is processed in blocks whose length is the period. Within a block, all the row numbers are listed first, then all the column numbers, forming one digit stream; that stream is then read back in consecutive pairs, and each new (row, column) pair is mapped through the square to produce a ciphertext letter. Because rows and columns from neighbouring letters get interleaved, a single plaintext letter influences several ciphertext letters. Decoding reverses the process: read each cipher letter's coordinates, split the block's digit sequence into a rows-half and a columns-half, and recombine them.

The security comes from the period: a larger period mixes more letters together and resists analysis better, while an unset period fractionates the whole message as one block. All computation is local and private. Note that non-letters are stripped, text is upper-cased, and J is folded into I before encryption.

Frequently asked questions

How does the Bifid cipher work?
Each letter becomes a row/column pair in a 5x5 Polybius square. Per block of the chosen period, all rows are written then all columns, and that digit stream is re-paired into new coordinates that map back to ciphertext letters — mixing two letters into each output.
What does the period control?
The period is the block length over which fractionation happens. A larger period spreads each letter's influence further and is harder to break; a smaller period keeps changes more local. Leaving it blank treats the entire message as a single block.
Does the keyword matter?
Yes. The keyword seeds the Polybius square: its unique letters fill the grid first, then the rest of the alphabet. A different keyword gives a different square and different coordinates, so both sender and receiver must use the same keyword and period.
Why are I and J combined?
A 5x5 square holds only 25 letters, so the 26-letter alphabet is reduced by merging I and J into one cell. Text is upper-cased and J is replaced by I before encryption, so decrypted J's appear as I — a normal feature of the cipher.

More tools