ADFGVX cipher
Encrypt or decrypt text with the WWI-era ADFGVX cipher, combining a keyed square with columnar transposition.
ADFGVX cipher
The ADFGVX cipher was used by the German army in 1918 to protect radio traffic during the final offensives of the First World War. It works in two stages: every character of the plaintext first becomes a pair of letters drawn from A, D, F, G, V and X, giving its row and column position in a keyed 6×6 grid; the resulting string of coordinate letters is then rearranged with a columnar transposition driven by a second password. Combining substitution with transposition made the cipher far harder to break by frequency analysis than either step alone, and this tool runs the whole process, in either direction, entirely in your browser.
The square password fills the grid: its letters and digits, deduplicated, go into the first cells, then the rest of the alphabet follows in order, so the same password always rebuilds the same square. The transposition password sets how many columns the coordinate string is written into and the order they're read back out — a different keyword scrambles the result very differently. Switch to ADFGX for the original variant: a 5×5 square with I and J merged and no digits, using only A, D, F, G and X. Direction flips between encrypting and decrypting with the same passwords; grouping the ciphertext into blocks of five is cosmetic and doesn't affect decryption.
Turn on "Show square and substitution step" to see the grid and the coordinate-letter string before transposition — useful for checking a hand calculation. Characters outside the cipher's alphabet, such as spaces and punctuation, are skipped during encryption rather than being enciphered.
Everything runs locally: passwords and text stay in your browser and are never uploaded anywhere. Copy the result, download it as a .txt file, or send it straight into another tool to chain a second transformation.