1. Home
  2. Writing & text tools
  3. Vigenère Cipher

Vigenère Cipher

Work with the famous “indecipherable cipher”: encode a message with a keyword, decode one you have the key for, or recover the key from a long enough cipher text.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Vigenère Cipher

  1. Choose the cipher and direction.
  2. Enter the keyword and text.
  3. Or open “Crack” and paste a long cipher text.

Features

  • Vigenère, autokey, Beaufort and Variant Beaufort
  • Keyword of any length; non-letters pass through
  • Cracker: key length by index of coincidence, letters by chi-squared
  • Use a found key with one click
  • This is a classical cipher for puzzles, games and teaching. It does not protect real secrets.

Supported formats

You can open

  • Typed or pasted text
  • TXT

You get

  • Copied text
  • TXT

Private by design

Your files are opened and processed by your browser on this device. They are never uploaded to openWorkstand or anyone else, so the Vigenère Cipher is safe for contracts, IDs, photos and work documents. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • A classical cipher for puzzles and teaching: it can be broken quickly and must not be used to protect real secrets.
  • Cracking needs at least about 60 letters, and more for long keys.

Guide

The Vigenère cipher: encrypting with a keyword, and breaking it

The Vigenère cipher encrypts with a keyword. Each letter of the message is shifted by the corresponding letter of the keyword, which repeats as often as needed. With the key LEMON, the first letter is shifted by L (11 places), the second by E (4), and so on, so the same plaintext letter becomes different cipher letters in different positions. For about 300 years it was called “le chiffre indéchiffrable”, the indecipherable cipher.

Encrypting and decrypting

Enter a keyword (letters only; other characters are ignored), choose Encrypt or Decrypt and type the text. Spaces, digits and punctuation pass through unchanged and do not use up key letters, which is the usual modern convention; capitals are preserved. For encryption you can output letters only or five-letter groups to hide word boundaries. The classic test, ATTACKATDAWN with key LEMON, gives LXFOPVEFRNHR.

Autokey, Beaufort and Variant Beaufort

Autokey Vigenère uses the keyword once and then continues with the plaintext itself, so the key never repeats. The Beaufort cipher subtracts the plaintext from the key instead of adding, which makes it its own inverse: encrypting twice gives the original. It was used in some cipher machines and the US Army’s M-209. Variant Beaufort subtracts the key, which is the same as Vigenère decryption.

How the cracker works

The weakness of Vigenère is the repeating key. If the key has five letters, every fifth letter of the message was shifted by the same amount, so each of those five “columns” is just a Caesar cipher. The cracker tries key lengths from 1 to 20. For each, it measures the index of coincidence of the columns, a statistic that is about 0.066 for English-like text and 0.038 for random letters, so the right length stands out. Then it breaks each column with frequency analysis, picking the shift whose letter distribution best matches English. The best keys are listed with their decryptions; press Use to load one into the cipher.

How much text is needed

Statistics need material. A rule of thumb is ten or more letters per key letter: a few hundred letters reliably reveal keys up to about ten letters. Below about 60 letters a warning appears, because guesses become unreliable. Multiples of the real key, such as LEMONLEMON, decrypt correctly too; the cracker prefers the shortest.

History

Giovan Battista Bellaso described the cipher in 1553; it was later misattributed to Blaise de Vigenère. Charles Babbage broke it in the 1850s but did not publish, and Friedrich Kasiski published a method in 1863. William Friedman’s index of coincidence (1920s) is the statistic used here.

A worked example

With the key LEMON, the first letter of ATTACK, A, is shifted by L (11 places) to L; the second, T, is shifted by E (4) to X; the third, T, by M (12) to F. Continuing gives LXFOPVEFRNHR for ATTACKATDAWN. In the cracker, a few paragraphs encrypted with the key DICKENS come back with DICKENS at the top, key length 7, because the columns for length 7 have an index of coincidence close to English.

Start with single shifts in the Caesar Cipher Solver, try a digraph cipher with the Playfair Cipher, or modular arithmetic with the Affine Cipher.

Checked against the current version of the Vigenère Cipher on .

Troubleshooting

The file does not open

Check that it is one of the supported formats above and opens in another app. Damaged files and password-protected PDFs cannot be read until they are repaired or unlocked.

It is slow or stops on a very large file

Everything runs on your device, so speed depends on its memory. Close other tabs, use a computer rather than a phone, or split the file into smaller parts first.

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

Can the cracker break the autokey cipher?

No. Autokey uses the message itself as most of the key, so the key never repeats and the column method does not apply. Autokey is still breakable, but with other techniques such as guessing probable words.

Does a longer keyword make Vigenère secure?

Longer keys need more cipher text to crack, but any repeating key can be broken. Only a truly random key as long as the message, used once — a one-time pad — is unbreakable.

Why does my decrypted text look half right?

One or more key letters are wrong, so every few letters come out garbled at a regular interval. Check the keyword, or in the cracker try the second or third candidate, which often differs by a single letter.

How long must a text be to crack it?

Roughly ten times the key length or more. A few hundred letters usually reveal keys up to about ten letters; very short texts give unreliable guesses.

What is the difference between Vigenère and Beaufort?

Vigenère adds the key letter to the plaintext letter; Beaufort subtracts the plaintext from the key, which makes it its own inverse. Variant Beaufort subtracts the key, which is Vigenère decryption.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.