314159 HELLO WORLD
KFPMT ZPVMI
Numeric key: 314159. Mode: encrypt. Each digit defines the shift for the matching letter.
Encrypt and decrypt text with the Gronsfeld cipher online using a numeric key, repeated digit shifts, and a selectable alphabet.
314159 HELLO WORLD
KFPMT ZPVMI
Numeric key: 314159. Mode: encrypt. Each digit defines the shift for the matching letter.
314159 KFPMT ZPVMI
HELLO WORLD
Numeric key: 314159. Mode: decrypt. The same repeated key shifts letters back to the original text.
123 SECRET MESSAGE
TGFTFV NFUUCIG
Numeric key: 123. The key repeats as 1, 2, 3, 1, 2, 3 while the message is encrypted.
314159 ATTACK AT DAWN!
DUYBLP DY EDFO!
Numeric key: 314159. Only letters are shifted. Spaces, punctuation marks, and other symbols remain unchanged.
The Gronsfeld cipher is a classical polyalphabetic cipher that works like a sequence of Caesar shifts. Instead of using one fixed shift for the whole message, it uses a numeric key where each digit defines a different shift.
For example, with the key 314159, the first letter is shifted by 3 positions, the second by 1, the third by 4, and so on. When the end of the key is reached, the digits repeat from the beginning until the full message is processed.
During decryption, the same numeric key is used in reverse: each encrypted letter is shifted back by the corresponding digit. Spaces, punctuation, digits, and symbols that are not part of the selected alphabet are usually preserved unchanged.
The Gronsfeld cipher is closely related to the Vigenere cipher, but it uses digits instead of letters as the key. In Vigenere, each key letter represents a shift value. In Gronsfeld, the shift values are written directly as numbers from 0 to 9.
This makes Gronsfeld easier to use manually, because the key already tells you how far each letter should move. At the same time, it has similar weaknesses to other classical polyalphabetic ciphers and should not be considered secure by modern standards.
The Gronsfeld cipher is traditionally associated with Count Gronsfeld and is often described as a numeric variant of the Vigenere cipher. It belongs to the family of historical polyalphabetic substitution ciphers.
Although it is much easier to break today, the Gronsfeld cipher remains useful for learning how repeated keys, changing shifts, and classical encryption systems work.
Classic letter-shift cipher with custom shift values.
Classic digraph substitution cipher with keyword matrix encryption.
Classical reciprocal cipher based on a keyword.
Keyword-based polyalphabetic encryption and decryption.
XOR-based Vernam encryption with Base64 output.
Classical A/B encoding and text steganography with the Bacon cipher.