ADFGX Cipher Encoder Decoder
Encrypt plaintext into ADFGX cipher text or decrypt an ADFGX message back to readable text.
Use a keyworded 5x5 square and a columnar transposition key to explore this World War I hand cipher.
- ADFGX combines Polybius substitution with columnar transposition.
- Use one keyword for the 5x5 square and one for column order.
- Only A, D, F, G, and X appear in the encrypted message.
- Use it for historical study and puzzles, not real secrecy.
The ADFGX cipher is a fractionating cipher that begins with a Polybius square. Each plaintext letter is replaced by a two-letter coordinate made from the row and column labels A, D, F, G, and X.
A columnar transposition cipher is a cipher that writes text into rows under a keyword, then reads columns in alphabetical keyword order. In ADFGX, the coordinate stream is transposed after substitution, so the final message hides both letter identities and coordinate positions.
The classic ADFGX cipher uses a 25-letter square, so I and J normally share a cell. This tool follows that convention for compatibility with historical descriptions.
Plain text
ATTACK AT DAWN
Square keyword: CIPHER | Transposition key: CARGO
The plaintext is first converted to ADFGX coordinate pairs, then rearranged by columns.
Plain text
MEET EAST GATE
Square keyword: RADIO | Transposition key: TRAIN
Changing either keyword changes the square, the column order, and the final ciphertext.
ADFGX was introduced by the German Army near the end of World War I for field communications. The coordinate letters were chosen because A, D, F, G, and X are relatively distinct in Morse code, which helped reduce telegraph copying errors.
The cipher is historically important because it combines substitution and transposition in a practical hand system. It was later expanded into the ADFGVX cipher, which added digits and used a 6x6 square.
Today, ADFGX is best used for classroom cryptography, puzzle construction, CTF warmups, and demonstrations of how layered classical ciphers can still leak patterns under analysis.
Two Keys Matter
Sender and receiver need the same square keyword and the same transposition key.
I/J Are Combined
The 5x5 alphabet square has 25 cells, so J is normalized to I.
Educational Only
Use it for historical learning and puzzles, not for modern confidentiality.