πŸ” WWI-Era Cipher  Β·  Free Tool

ADFGVX Cipher
Encoder & Decoder Online

Encrypt and decrypt messages using the historic ADFGVX Cipher β€” a combination of Polybius square substitution and columnar transposition used by the German Army in World War I.

Instant & Free 100% Client-Side Step-by-Step Trace Full Alphabet + Digits
Keyword to shuffle the 6Γ—6 grid (letters + digits 0-9). Unique chars placed first.
Keyword for columnar transposition. Column order determined alphabetically.
 Copied!

Everything You Need to Work With ADFGVX

A complete, browser-based ADFGVX cipher tool with all options to encode, decode, and understand the algorithm.

πŸ“

Custom Polybius Square

Enter any keyword to generate a unique 6Γ—6 Polybius square with all 26 letters and digits 0–9 arranged in key order.

πŸ”€

Columnar Transposition

Apply a second keyword to perform columnar transposition, reordering bigram columns alphabetically for true ADFGVX output.

πŸ‘οΈ

Polybius Grid Viewer

Toggle the live Polybius square to see exactly how each character maps β€” great for learning and verification.

πŸ”

Step-by-Step Trace

Reveal every intermediate step: substituted bigrams, transposition table, column ordering, and final ciphertext.

πŸ”„

Encrypt & Decrypt

Switch between encryption and decryption modes with a single click. Decryption reverses both transposition and substitution exactly.

πŸ›‘οΈ

Real-Time Validation

Instant input validation catches empty keys, invalid characters, and malformed ciphertext before processing begins.

πŸ’»

100% Client-Side

All processing happens in your browser. No data is ever sent to a server, keeping your messages completely private.

πŸ“±

Mobile Friendly

Fully responsive design adapts to any screen size. Works on smartphones, tablets, and desktop browsers.

How the ADFGVX Cipher Works

The ADFGVX cipher applies two sequential transformations to your plaintext, making it significantly harder to crack than a simple substitution cipher.

01

Build the Polybius Square

A 6Γ—6 grid is filled with all 26 letters and digits 0–9, shuffled by a keyword. The row and column headers are A, D, F, G, V, X.

02

Substitution Phase

Each character in the plaintext is looked up in the grid and replaced by its row header followed by its column header β€” producing bigrams like AD, FX, GV, etc.

03

Write Into Columns

The resulting bigram string is written row by row under the transposition keyword. The number of columns equals the key length.

04

Sort Columns

Columns are reordered alphabetically by their key letter. Each column is then read top-to-bottom to produce the final ciphertext.

ADFGVX Cipher: History, Algorithm & Use Cases

The ADFGVX cipher is one of the most historically significant field ciphers ever deployed in military communication. Introduced by the German Army in March 1918 during the final push of World War I, it was designed by Colonel Fritz Nebel to provide rapid yet reasonably secure encryption for radio transmissions on the Western Front. The name derives from the six letters β€” A, D, F, G, V, and X β€” chosen because their Morse code representations are visually dissimilar, reducing transcription errors in the field.

At its core, the ADFGVX cipher is a fractionating cipher that combines two classical cryptographic techniques: a Polybius square substitution and columnar transposition. The Polybius square is a 6Γ—6 grid accommodating all 26 letters of the Latin alphabet plus the 10 decimal digits (0–9), making it well-suited for encoding numeric field data alongside text. The grid is filled using a keyword β€” any word or phrase β€” so that unique characters from the keyword appear first, followed by the remaining characters in sequence. This keyed arrangement ensures that two users sharing both keyword and transposition key will always produce identical ciphertext from the same plaintext.

During encryption, each plaintext character is located in the Polybius square. Its row letter and column letter (both from the set A, D, F, G, V, X) form a two-character bigram. The entire plaintext is converted to a string of these bigrams, effectively doubling the character count. This string is then written into a grid of columns whose width matches the length of a second transposition keyword. The columns are reordered alphabetically based on the keyword letters, and reading each column from top to bottom produces the final ciphertext. This double transformation means that even a single character change in the plaintext ripples unpredictably through the output.

The ADFGVX cipher was actually an upgrade to an earlier variant, the ADFGX cipher, which used only a 5Γ—5 grid (merging I and J) and lacked the V character. Adding V expanded the grid to 6Γ—6, allowing digits to be encoded natively β€” critical for military coordinates and unit codes. Despite its ingenuity, French cryptanalyst Georges Painvin cracked ADFGVX in June 1918 by exploiting repeated key patterns found when two messages shared the same transposition key. His breakthrough allowed the Allies to decode German positions just in time to repel the Spring Offensive.

Today, the ADFGVX cipher has no practical security value and should not be used to protect sensitive data. However, it remains a cornerstone of cryptography education. It appears in competitive puzzle-solving, Capture the Flag (CTF) challenges, escape rooms, historical re-enactments, and academic courses on classical cryptanalysis. Understanding ADFGVX builds intuition for concepts like diffusion, confusion, and key management that underpin modern encryption algorithms like AES. This free online ADFGVX cipher encoder and decoder lets you explore the algorithm interactively β€” try different Polybius keys, experiment with transposition keyword lengths, and enable the step-by-step trace to follow every transformation from plaintext to ciphertext and back.

Frequently Asked Questions

The ADFGVX cipher is a field cipher created by German military cryptographer Fritz Nebel and used during World War I. It combines a keyed 6Γ—6 Polybius square (substitution) with a columnar transposition step, producing ciphertext consisting only of the letters A, D, F, G, V, and X.
A Polybius square is a grid where letters (and sometimes numbers) are arranged in rows and columns. Each character is identified by its row and column coordinates. The ADFGVX version uses a 6Γ—6 grid with coordinates labelled A, D, F, G, V, X instead of numbers.
ADFGX used a 5Γ—5 grid for 25 letters (I and J shared one cell). ADFGVX added the letter V to create a 6Γ—6 grid with 36 cells, accommodating all 26 letters and all 10 digits (0–9). This enabled encoding of numbers directly, which was critical for battlefield numerical data.
To decrypt, you need both the original Polybius square key and the transposition key. The decryption reverses both steps: first, the columnar transposition is undone by rearranging columns back to their original order, and then each bigram is looked up in the Polybius square to recover the plaintext character. Use the Decrypt tab above with the same two keys used during encryption.
Because every character in the plaintext is replaced by a pair of letters, each drawn from the set {A, D, F, G, V, X}. These six letters were chosen because their Morse code patterns are distinct, reducing the chance of operator error when transmitting ciphertext by radio in wartime conditions.
No. French cryptanalyst Georges Painvin broke the ADFGVX cipher in June 1918, just months after its introduction. It is considered cryptographically weak by modern standards. This tool is intended for educational, historical research, and puzzle-solving purposes only.
Yes. The ADFGVX cipher's 6Γ—6 Polybius square accommodates digits 0–9 alongside all 26 letters, so numbers in your plaintext will be encoded just like letters. This is one advantage ADFGVX has over the older ADFGX variant.

Explore 100+ Free Online Tools

From cipher decoders to SEO auditors, developer utilities to AI-powered tools β€” discover everything available on SEOWebChecker, all free.