Vigenère Cipher Encoder Decoder – Encrypt Text with a Keyword

Use the free Vigenère Cipher Encoder Decoder below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.

A cipher that outlived simple substitution

For centuries, the standard way to hide a message was to shift every letter by the same amount, as in the Caesar cipher. That is easy to break: count the letters, guess the shift, and the message falls open. The Vigenère cipher, described in the sixteenth century, fixed the obvious weakness by using a keyword instead of a single shift. Each letter of the keyword shifts a different letter of the message, so the same plaintext letter becomes different ciphertext letters in different positions, and simple letter counting stops working.

This tool implements that cipher faithfully. Type your text, choose a keyword, and pick Encrypt or Decrypt. Letters keep their upper or lower case, and spaces, punctuation and digits pass through unchanged. The result is computed entirely in your browser, with no server involved.

How it works, with an example

Take the classic example: the message “attackatdawn” with the keyword “lemon”. Each keyword letter becomes a shift: l shifts by 11, e by 4, m by 12, o by 14, n by 13, and then the keyword repeats. The first plaintext letter a shifts by 11 to l, the second t shifts by 4 to x, and so on, giving “lxfopvefrnhr”. Decryption runs the same process backwards: each ciphertext letter is shifted back by its keyword letter, recovering the original exactly. Try it here: encrypt “attackatdawn” with “lemon”, then decrypt the result with the same keyword and watch the original return.

Two details matter. First, only letters consume keyword positions: spaces and punctuation do not advance the keyword, which is the standard behaviour and keeps encryption and decryption in step. Second, the keyword is case-insensitive and ignores non-letters, so “Lemon!” behaves exactly like “lemon”. If your keyword contains no letters at all, the tool says so instead of producing nonsense.

Why you must not trust it with real secrets

Vigenère was once called “the indecipherable cipher”, but that title expired centuries ago. With enough ciphertext, the repeating keyword leaves statistical fingerprints, and methods from the nineteenth century onwards can recover both the keyword length and the keyword itself. A short keyword is especially weak: a one-letter keyword is just a Caesar cipher. Modern computers break Vigenère ciphertexts in seconds. Use this tool for puzzles, history lessons, escape-room clues and learning how polyalphabetic ciphers work, and use a modern standard such as AES, through a proper tool, for anything that actually needs to stay secret.

Choosing a keyword

Longer keywords resist simple analysis better than short ones, and a keyword that is itself a random string of letters is stronger than a dictionary word. Avoid reusing the same keyword across many messages, since more ciphertext under one key gives an attacker more material. None of this makes Vigenère secure by modern standards, but it makes a classroom exercise or a puzzle noticeably harder to crack by hand, which is the point of those uses.

Practical uses

Teachers demonstrate why repeating keys leak information. Puzzle makers hide clues in birthday cards and treasure hunts. Writers of historical fiction check that a period cipher scene reads correctly. Hobbyists exchange coded notes with friends. Each use shares the same charm: a cipher simple enough to do by hand, strong enough to defeat a casual glance, and historic enough to be worth knowing.

Privacy note

Your text and keyword never leave your device. The cipher runs in the browser tab, so even a message you would rather keep private stays private while you encode it. Just remember that the ciphertext itself is not strong protection: anyone who intercepts it and cares enough can decode it, so do not send real secrets this way.

Related tools

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top