The Four-Square cipher takes the digraph substitution idea behind Playfair one step further: instead of a single keyed grid, it uses four grids at once — two plain unshifted alphabets and two independently keyed squares — making each encrypted letter pair depend on two separate keywords instead of one.
What Is the Four-Square Cipher Tool?
Type a message and two keywords, and the tool builds all four 5x5 grids (I/J merged), locates each plaintext letter pair in the plain squares, and reads the ciphertext pair off the two keyed squares — all computed instantly in your browser with full encrypt/decrypt round-tripping.
How to Use It
- Open the tool at /tools/four-square-cipher.
- Type your message into the text field.
- Enter Key 1 (builds the top-right grid) and Key 2 (builds the bottom-left grid).
- Click Encrypt to scramble the message, or Decrypt to reverse it.
- Copy the result with one click.
Key Features
- Two independent keywords for extra security over single-key digraph ciphers like Playfair.
- Full encrypt and decrypt support, computed entirely client-side.
- Automatic I/J merging and odd-length padding, following the classical cipher conventions.
- Verified against the published Delastelle reference example.
When to Use This Tool
- Studying classical digraph substitution ciphers and how they compare to Playfair and Bifid.
- Puzzle design or escape-room clues that need a genuinely hand-solvable but non-trivial cipher.
- Cryptography coursework that covers the Polybius-square family of ciphers.
Try It Now
Open Four-Square Cipher directly, or press ⌘K and type the tool name from anywhere on the site.
Part of the Security & Crypto collection on WebdevToolbox — free, browser-based developer tools with no login required.