ADFGVX turns every letter (and digit) of the Plaintext into a pair of coordinates from the six letters A D F G V X, and then scrambles the resulting stream with a column shuffle — so one plaintext letter is first split in two, and each half travels separately. Ciphers that cut letters into pieces like this are called Fractionation ciphers.
Build a 6×6 Polybius square filled with a mixed Alphabet: the square Key letters first (duplicates dropped), then the rest of the alphabet, then the digits 0–9. Every cell holds one character.
Replace every plaintext character with the two coordinates of its cell — the row letter and the column letter. A message of N letters becomes a stream of 2N letters from the set A D F G V X.
Write the fractionated stream into a grid, row by row, as wide as the transposition key. If the last row is short, the grid is padded to a full rectangle.
Read the grid out column by column, in alphabetical order of the transposition key letters. That column-by-column reading is the Transposition — the final ciphertext.
Read the first rows: A sits in the cell at row A, column A
of the square, so it becomes AA; T lands at row A, column
G and becomes AG. The third column shows the fractionated stream
growing — the stream that the transposition will later shuffle.
Given the keys, decryption is mechanical:
Split the ciphertext back into its columns (equal chunks, since the grid was a full rectangle) and lay them back into the grid in key-letter order.
Read the grid row by row — the fractionated stream returns.
Take the coordinates two at a time and look each pair up in the square: the cell is the plaintext character.
The tool does all three steps when you press Decrypt with both keys filled in.
The German army first fielded the 5×5 ADFGX version (letters only, I and J sharing a cell), and within weeks added a sixth row for the digits — ADFGVX. The tool supports both: switch variants above the key fields and the square, the fractionation alphabet and the allowed characters change with it.
Try it in the toolOpen the tool at the ADFGVX cipher. Two key fields sit next to the
variant selector: the square Key and the transposition key.
This guide walks through a full encryption with the default example
keys — NIGHT for the square and GERMAN for the transposition.
Type a short message, for example ATTACK AT 9 AM, and watch the
output: it contains only the letters A D F G V X — twice as many
characters as your message. Each plaintext character has been replaced
by its row and column in the Polybius square. Change one
square key letter and every coordinate changes: the square is the
Substitution half of the cipher.
Now change only the transposition key. The output keeps the same character counts but the letters jump around — the fractionated stream has been cut into columns and read back in key order. This is the Transposition half. Notice what neither half achieves alone: the substitution flattens nothing by itself, and the transposition carries no letter statistics of its own — the strength comes from stacking them.
Switch to Decrypt, paste the ciphertext and use the same keys. The tool rebuilds the grid, reads it back row by row and looks the coordinate pairs up in the square. Trailing pad characters (the grid padding) may add a stray letter or two at the end of short messages — that is the rectangle being completed, not a bug.
Switch the variant to ADFGX: the square loses its sixth row (no digits, and J folds into I), and non-letters disappear from the output. The workflow is otherwise identical.
Full ciphertext, both keys, the variant — that is all a receiver of 1918 needed. Try the practice challenges to see what an attacker without the keys can do.
ADFGVX was designed to resist exactly the two attacks that had killed earlier field ciphers: Frequency analysis (killed by the Fractionation) and pattern-based attacks (killed by the Transposition). It fell anyway — to one of the most impressive cryptanalyses of the First World War. The demo challenge opens the tool's guided cracker on a real ciphertext.
With the fractionation alone, the ciphertext letters A D F G V X have no useful frequencies of their own: every letter of the plaintext is smeared across two of them. With the transposition alone, the letters of the ciphertext are real fractionated coordinates, but shuffled — their single-letter frequencies are flat too. The defence is the stacking, and the attack has to unstack it in the right order: first undo the shuffle, then solve what is left.
Undoing the Transposition means learning which chunks of the ciphertext were neighbouring columns of the grid. The tell-tale sign: when two chunks really were neighbours, zipping them together pairs every row-coordinate with the matching column-coordinate of the same plaintext letter — the resulting two-letter "symbols" are real letters, with skewed, language-like frequencies. A chi-square independence test on the coordinate pairs measures exactly that tie, and the tool uses it both to rank candidate key lengths and to suggest which columns belong together. Treat the suggestions as hints: on short messages a wrong arrangement can look convincing, and the real test is whether the next stage produces readable text.
Once the columns sit in the right slots, the coordinate pairs are the letters of an ordinary monoalphabetic Substitution over 25 or 36 symbols. The old machinery applies: the most frequent symbols are the most frequent letters, Crib words confirm guesses, and each confirmed symbol pins a cell of the square and constrains its row and column neighbours. The tool's guided cracker walks this stage with a frequency chart, letter suggestions and a live preview.
Georges Painvin's breakthrough in the spring of 1918 came from quantity: dozens of messages enciphered with the same daily key, compared column by column, length against length. Identical long messages on the same key lined up and betrayed the column order in days. A single short message gave him almost nothing — which is why the German radio discipline (or lack of it) decided the battle more than the cipher did.
Broken traffic helped stop the German spring offensive of 1918. The cipher itself was sound for its day; the procedures around it were not. ADFGVX remains the textbook case of fractionation plus transposition — and of how key reuse defeats even good designs.