Skip to main content
ciphercryptographyfour square ciphersecuritywebdevtoolbox

How to Use the Four-Square Cipher Tool — WebdevToolbox Guide

Encrypt and decrypt letter pairs with the Four-Square cipher, a digraph substitution cipher that uses four 5x5 grids and two independent keywords.

WebdevToolbox Team2 min read

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

  1. Open the tool at /tools/four-square-cipher.
  2. Type your message into the text field.
  3. Enter Key 1 (builds the top-right grid) and Key 2 (builds the bottom-left grid).
  4. Click Encrypt to scramble the message, or Decrypt to reverse it.
  5. 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.

Tagged with

ciphercryptographyfour square ciphersecuritywebdevtoolbox

Related posts