ADFGVX cipher

The German cipher of 1918: a keyed 6x6 square with the labels A D F G V X, then a columnar transposition.

How it works

Fritz Nebel’s cipher was introduced by the German army in March 1918, first as ADFGX (5 by 5) and from June as ADFGVX (6 by 6, with digits). The labels were chosen because their Morse codes are hard to confuse.

Each character becomes its row and column label in a keyed square, doubling the length of the text. These letters are then written in rows under a second keyword and the columns are read in alphabetical order of the key letters. ATTACK AT 1200 AM with the classic square and key PRIVACY gives DGDD DAGD DGAF ADDF DADV DVFA ADVX.

The transposition separates the two halves of every letter, so it is a strong pencil and paper cipher. Still, the French cryptanalyst Georges Painvin broke it by hand in the spring of 1918, exploiting messages sent with the same keys on the same day; one of his decryptions in June warned of an attack near Compiègne.

Everything is calculated in your browser. Nothing you type leaves your device.