✡️ Bifid Cipher

Encrypt and decrypt text with the Bifid cipher. Combines a Polybius square with coordinate fractionation for a stronger classical cipher.

About the Bifid Cipher

The Bifid cipher, invented around 1901 by French cryptographer Félix-Marie Delastelle, is a fractionating cipher that combines a Polybius square with transposition. Each letter is split into two coordinates (row and column); the row coordinates and column coordinates are then separated, recombined, and converted back into letters. This "fractionation" makes Bifid significantly harder to break than a plain Polybius square. This tool runs entirely in your browser — nothing is uploaded.

How it works

  • Build the grid — A 5x5 Polybius square (I and J share a cell), optionally scrambled by a key.
  • Encrypt — Convert each plaintext letter to its (row, col) coordinates. Write all rows, then all columns, as one sequence. Re-pair this sequence and convert each pair back to a letter.
  • Decrypt — Reverse the process: the ciphertext letters give coordinate pairs; the first half of the coordinates are the plaintext rows and the second half are the plaintext columns.
  • Only letters A–Z are processed; I and J are merged and non-letters are removed.

Use cases

  • Studying fractionating ciphers and how they mix substitution with transposition.
  • Building puzzles that are harder than a plain Polybius square.
  • Understanding the bridge between classical and more modern cipher design.
  • Comparing Bifid with related ciphers like Trifid and Four-square.

Frequently asked questions

Is the Bifid cipher secure? No. It is a classical cipher and can be broken with hill-climbing and frequency analysis, though it is more resistant than simple substitution.

Why do I and J share a cell? The 5x5 grid holds 25 cells while the English alphabet has 26 letters, so I and J are combined.

What does the optional key do? It scrambles the letter order in the grid (key letters first, then the rest), changing the coordinate mapping without altering the algorithm.

Does this tool upload my text? No. All encryption and decryption happens locally in your browser.