Tool to decrypt/encrypt ADFGX. ADFGX is a German encryption system, an old version of ADFGVX cipher, which uses a 5x5 square grid and a double mechanism of substitution then transposition.
ADFGX Cipher - dCode
Tag(s) : Substitution Cipher, Transposition Cipher, GRID_CIPHER
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
ADFGX is a substitution cipher used during World War I by the German army. It gets its name from the letters A, D, F, G, and X, which were used to label the columns and rows of a 5x5 grid used in encryption.
The version with the letter V and a 6x6 grid, called ADFGVX, is generally better known, because it is more widespread.
The decryption process is identical to the ADFGVX cipher.
The ciphertext should contains only 5 distinct characters: A, D, F, G and X.
(Optional) The ciphered message must have number of character divisible by the permutation length.
The name of the man who deciphered it is Painvin, homonym of 2 French words: bread (pain) and wine (vin), any allusion is a clue.
Any reference to Germany or its army at the beginning of the 20th century is a clue.
If the ciphertext has not be permuted, the text is a simple bigrammic substitution.
After a replacement by a random alphabet, the text should have an index of coincidence similar to the one of the plaintext language.
To crack ADFGX without a key, there is no method other than the brute-force attack (test of all possible permutations).
The substitution grid can be found by performing an alphanumeric substitution of the bigrams resulting from the encrypted text after the permutations.
See the dCode tool for mono-alphabetic substitutions.
The decoding of ADFGX without any information is complicated, but it is possible to find the permutation key first (see above) and then to perform a mono-alphabetical substitution.
The 5 letters A, D, F, G and X have been selected due to their Morse code equivalent. Indeed, their transcriptions are quite different, which avoids possible errors during radio/telegraph transmissions.
GEDEFU 18 stands for GEheimschrift DEr FUnker 18 which translates as radiotelegraphists 18 cipher is the old name of the ADFGX and ADFGVX ciphers.
dCode retains ownership of the "ADFGX Cipher" source code. Any algorithm for the "ADFGX Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "ADFGX Cipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "ADFGX Cipher" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "ADFGX Cipher" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: ADFGX Cipher on dCode.fr [online website], retrieved on 2025-04-15,