Search for a tool
ADFGVX Cipher

Tool to decrypt/encrypt with ADFGVX, a German cipher from World War 1 using a grid and the letters A,D,F,G,V,X.

Results

ADFGVX Cipher -

Tag(s) : Substitution Cipher, Transposition Cipher, Grid Cipher

Share
Share
dCode and more

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!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'ADFGVX Cipher' tool for free! Thank you!

ADFGVX Cipher

ADFGVX Decoder

 


Loading...
(if this message do not disappear, try to refresh this page)

Loading...
(if this message do not disappear, try to refresh this page)

Without knowing the permutation key

Without knowing the grid

ADFGVX Encoder

 

Loading...
(if this message do not disappear, try to refresh this page)

Loading...
(if this message do not disappear, try to refresh this page)

See also: ADFGX Cipher

Answers to Questions (FAQ)

What is the ADFGVX cipher? (Definition)

ADFGVX is a German military cipher dating from the First World War. It combines substitution using a 6Ă—6 grid with columnar transposition. The letters A, D, F, G, V and X are used to represent the coordinates of characters in the grid.

How to encrypt using the ADFGVX cipher?

The ADFGVX cipher uses a 6Ă—6 square grid containing 36 distinct alphanumeric characters: the 26 letters of the Latin alphabet and the 10 digits from 0 to 9. The grid can be scrambled using a keyword.

The rows and columns are labelled, from top to bottom and from left to right, with the letters A, D, F, G, V and X. Each character is therefore identified by a pair of coordinates (row, column).

Example: A default ADFGVX grid (without a keyword), such that A = (A,A), Z = (V,D), etc.

\ADFGVX
AABCDEF
DGHIJKL
FMNOPQR
GSTUVWX
VYZ0123
X456789

Perform a substitution by bigrams, replacing each character in the message with its corresponding pair of coordinates.

Example: BERLIN becomes AD,AV,FX,DX,DF,FD

The intermediate message is then subjected to columnar transposition. This transposition uses a permutation key, usually derived from a keyword. To determine the column reading order, sort the letters of the keyword alphabetically.

Identical letters are ranked according to their order of appearance. However, avoiding repeated letters in the key is recommended, as they can make the permutation order more difficult to determine.

Example: The keyword CODE gives the permutation 1,3,4,2: the letters C(1),O(2),D(3),E(4), sorted alphabetically, become C(1),D(3),E(4),O(2), corresponding to columns 1,3,4,2.

Write the intermediate message row by row in a table whose width equals the length of the key.

If the number of characters does not fill the last row, some variants add padding characters, such as X. This padding is not mandatory and must be taken into account during decryption.

Example:

C(1)O(2)D(3)E(4)
ADAV
FXDX
DFFD

Rearrange the columns according to the order defined by the key.

Example: After transposition 1,3,4,2 (the 2nd column O(2) is moved to the end)

C(1)D(3)E(4)O(2)
AAVD
FDXX
DFDF

The final ciphertext is obtained by reading the columns from top to bottom, from left to right.

Example: The final ciphertext is AFDADFVXDDXF

Historically, encrypted messages were transmitted by radio, often in Morse code.

How to decrypt the ADFGVX cipher?

Decryption of the ADFGVX cipher requires the substitution grid and the transposition key.

Example: The plaintext DCODE, using the grid below and the transposition keyword CLE, produces the ciphertext FVFFVFAADA.

The keyword CLE defines the permutation 1,3,2, because the letters C(1),L(2),E(3), sorted alphabetically, become C(1),E(3),L(2).

The ciphertext is distributed vertically across a table with $ n $ columns, where $ n $ is the length of the key. The columns are initially considered in alphabetical order of the key, taking the length of each column into account.

Example:

C(1)E(3)L(2)
FVF
FVF
AAD
A

If the last row was not padded during encryption, take the actual number of characters in each column into account.

Restore the columns to their original order, as determined by the positions of the letters in the keyword.

Example:

C(1)L(2)E(3)
FVF
FAD
AVF
A

Then read the table row by row to recover the intermediate message before transposition.

Example: FAVVDFFAAF

Split this message into bigrams and replace each pair with the character corresponding to its coordinates (row, column) in the substitution grid.

Example:

\ADFGVX
AAZERTY
DUIOPQS
FDFGHJK
GLMWXCV
VBN0123
X456789

Example: FA = row F, column A = D; VV = C; DF = O; FA = D; AF = E. The plaintext is DCODE.

How to recognize an ADFGVX ciphertext?

An ADFGVX ciphertext normally contains only the six letters A, D, F, G, V and X.

The ciphertext length is generally even because each plaintext character is first replaced with a bigram.

If padding characters are added before transposition, the length of the intermediate text may also depend on the key length.

The name Painvin is generally associated with ADFGVX.

Clues relating to the First World War (WWI) should be noted.

The Roitelet Theorem is a novel by Frédéric Cathala (https://www.amazon.com/gp/product/2226153918?tag=dcodefr-21). Its plot features a spy during the First World War who encounters messages encrypted with ADFGVX.

How to determine whether a transposition was used?

Without transposition, the text obtained after substitution consists of bigrams that directly represent the plaintext characters. Columnar transposition separates the two letters of these bigrams and scrambles their order.

Frequency analysis, message length and repeated patterns can provide clues, but they do not always establish with certainty whether transposition was used.

How to decrypt ADFGVX without the transposition key?

The column permutation can be searched for without knowing the original key by testing different column orders. A brute-force attack quickly becomes expensive as the number of columns increases. Use the Brute-force Permutations button when this feature is available.

How to decrypt ADFGVX without the substitution grid?

It may be possible to recover some or all of the substitution grid after reconstructing the intermediate text and its bigrams. This can be approached as a substitution problem by exploiting frequency patterns and likely plaintext structures. dCode's monoalphabetic substitution tool may help explore some hypotheses, but adapting the analysis to bigrams is necessary.

How to decrypt ADFGVX without the key or the substitution grid?

Decrypting ADFGVX without either the transposition key or the substitution grid is a more complex cryptanalytic task. One approach is to search for the column permutation first, then attempt to reconstruct the grid from the resulting bigrams. Success depends in part on the message length, the plaintext language and the available clues.

Why were the letters ADFGVX chosen?

The letters A, D, F, G, V and X were chosen because their Morse code representations are sufficiently distinct to reduce the risk of confusion during radio transmission.

When was the ADFGVX cipher used?

The ADFGVX cipher was used by the German Army from June 1918. It was an evolution of the ADFGX cipher, introduced in March 1918. Adding the letter V made it possible to use a 6Ă—6 grid containing the 26 letters of the Latin alphabet and the 10 digits.

What is GEDEFU 18?

GEDEFU 18 is an abbreviation of the German phrase « GEheimschrift DEr FUnker 18 », which can be translated as « radio operators' cipher 18 ». The name is associated with the ADFGVX cipher system.

What is the ADFGX cipher?

ADFGX is a German military cipher introduced in March 1918 and the predecessor of ADFGVX. It uses a 5Ă—5 grid based on the Polybius square and the five letters A, D, F, G and X to represent character coordinates. The letter J is generally omitted from the grid to accommodate the remaining 25 letters.

Who broke the ADFGVX cipher?

The breaking of the ADFGVX cipher is particularly associated with French cryptanalyst Georges-Jean Painvin. One of the messages he deciphered became famous as the « Radiogram of Victory ». The intelligence obtained helped the French anticipate a German offensive in the Compiègne sector in June 1918.

When was the ADFGVX cipher broken?

Georges-Jean Painvin succeeded in deciphering messages encrypted with ADFGX and ADFGVX during the spring of 1918. On 2 June 1918, he deciphered the message that became famous as the « Radiogram of Victory ».

Source code

dCode retains ownership of the "ADFGVX Cipher" source code. Any algorithm for the "ADFGVX Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "ADFGVX 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 "ADFGVX Cipher" or any other element are not public (except explicit open source licence). 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.

Cite dCode

The content of the page "ADFGVX Cipher" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).

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: https://www.dcode.fr/adfgvx-cipher

In a scientific article or book, the recommended bibliographic citation is: ADFGVX Cipher on dCode.fr [online website], retrieved on 2026-11-28, https://www.dcode.fr/adfgvx-cipher

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'ADFGVX Cipher' tool for free! Thank you!


https://www.dcode.fr/adfgvx-cipher
© 2026 dCode — The ultimate collection of tools for games, math, and puzzles.
â–˛  
Feedback