← All tools

Gronsfeld Cipher

Encrypt and decrypt with the Gronsfeld cipher, a polyalphabetic substitution cipher. It is a variant of the Vigenère cipher, but instead of a keyword of letters, it uses a numeric key. Each digit of the key determines the shift for the corresponding letter of the plaintext. Everything runs locally in your browser.

Numeric Key

Encrypt (plaintext → cipher)

Decrypt (cipher → plaintext)

The math. For a plaintext letter $P$ and a key digit $d$ at the same position, the ciphertext letter $C$ is: $C = (P + d) \pmod{26}$. To decrypt, the process is reversed: $P = (C - d) \pmod{26}$. The key is repeated to match the length of the message. Since the shifts are limited to 0-9, Gronsfeld is easier to crack than Vigenère, but more complex than a simple Caesar cipher. Pairs with the Caesar, Vigenère, and Beaufort cipher tools. Everything runs locally — nothing leaves your browser.