ADFGX / ADFGVX Cipher
Encrypt or decrypt the two-stage WWI cipher: first substitute letters using a keyed Polybius square, then rearrange the symbols using a columnar transposition keyword. Everything runs in your browser.
Repeated letters are supported; ties retain original column order.
Changes automatically rebuild the square. You can edit its full alphabet below.
Enter each allowed character exactly once, in square reading order.
Encryption removes punctuation and spaces. In ADFGX, J is treated as I.
Choose a cipher, enter two keys, and select Encrypt or Decrypt.
Result
Result appears here.
See both stages
Stage 1 — substitution
—
Stage 2 — columnar transposition
—
How it works
ADFGX uses five symbols (A, D, F, G and X) and a 5×5 square with I and J sharing a cell. ADFGVX adds V, uses a 6×6 square and can encode digits. Each plaintext symbol becomes a pair of row/column symbols. The transposition keyword then reorders entire columns.
Decryption needs the correct square alphabet and the transposition keyword; frequency analysis alone cannot determine them reliably. The original cipher does not preserve punctuation, letter case or word spaces.