Skip to content
100% local

ADFGVX cipher

Encrypt or decrypt text with the WWI-era ADFGVX cipher, combining a keyed square with columnar transposition.

Input
Output

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.

FAQ

What is the difference between ADFGVX and ADFGX?
ADFGX is the original 1918 cipher: a 5×5 square holding the 26 letters with I and J merged, giving 25 cells. ADFGVX extends it to a 6×6 square that also includes the ten digits, so numbers can be enciphered alongside letters. Pick the variant with the "Variant" option.
Why does the cipher use only the letters A, D, F, G, V and X?
Those six letters were chosen because their Morse code representations (dot and dash patterns) are very distinct from one another, which reduced transmission errors over the noisy radio links the German army used in 1918.
What happens if I leave the transposition password empty?
An empty transposition password is treated as a single-column transposition, which is a no-op: the ciphertext equals the substitution step alone. Set a transposition password to actually scramble the coordinate letters.
What happens to spaces and punctuation in the plaintext?
They are skipped during encryption and are not part of the output. Decrypting recovers the original letters (and digits, in the ADFGVX variant) but not their original spacing or punctuation.
Is my text or my passwords uploaded anywhere?
No. Both encryption and decryption run entirely in your browser — your text and passwords never leave your device.