Vigenère Cipher Calculator — Encode & Decode
Type your message and a keyword, choose encrypt or decrypt, and get the Vigenère result instantly — along with a letter-frequency breakdown of the output.
Mode
How does this calculator work?
The Vigenère cipher shifts each plaintext letter by the corresponding keyword-letter position (A=0…Z=25), repeating the keyword as needed: Cᵢ = (Pᵢ + Kᵢ) mod 26 to encrypt and Pᵢ = (Cᵢ − Kᵢ + 26) mod 26 to decrypt. Only A–Z letters are processed; spaces pass through unchanged.
Formula
How this is calculated
The Vigenère cipher is a polyalphabetic substitution cipher that extends the simple Caesar cipher by rotating through a keyword instead of applying one fixed shift. Each letter of the plaintext is shifted by the numeric value of the matching keyword letter (A = 0, B = 1, …, Z = 25), wrapping at 26. When the keyword is shorter than the message it repeats cyclically. For example, the key KEY (shifts 10, 4, 24) applied to HELLO yields RIJVS.
Decryption simply reverses the shift: subtract the key letter value modulo 26 (adding 26 first to avoid negatives). The bar chart below the result shows the top output letter frequencies. Because the cipher applies multiple different shifts, flat frequency distributions (similar counts for all letters) indicate a longer key relative to the message, making the cipher harder to break by frequency analysis.
This tool processes only the 26 Latin letters A–Z (converted to upper-case). Spaces are preserved in their original positions; all other characters — digits, punctuation, accented letters — are stripped before encoding. The Vigenère cipher is a classical historical cipher and is not secure for real-world use; any modern cryptographic library should be used instead for actual data protection.
Frequently asked questions
Once the key length is guessed — using Kasiski examination or the index-of-coincidence technique — each position sharing the same key letter forms an independent Caesar cipher, which is trivially broken by frequency analysis. All classical ciphers are unsuitable for real security.
The key repeats cyclically. A key of KEY (K=10, E=4, Y=24) applied to a 9-letter message uses the shifts 10, 4, 24, 10, 4, 24, 10, 4, 24 — the pattern wraps as many times as needed.
Only the 26 Latin letters A–Z. Spaces are passed through unchanged; all digits, punctuation and accented letters are removed before encoding. The keyword is similarly stripped to letters only.
Also known as
TG we-Calculate Editorial Team. (2026). Vigenère Cipher Calculator — Encode & Decode [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/vigenere-cipher-calculator
TG we-Calculate Editorial Team. "Vigenère Cipher Calculator — Encode & Decode." TG we-Calculate. 2026. https://we-calculate.com/calculator/vigenere-cipher-calculator.
TG we-Calculate Editorial Team, "Vigenère Cipher Calculator — Encode & Decode," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/vigenere-cipher-calculator
@misc{wecalculate_vigenere_cipher_calculator, title = {Vigenère Cipher Calculator — Encode & Decode}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/vigenere-cipher-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
