Caesar Cipher Decoder, Vigenère Solver & Classical Cipher Workbench

Encrypt, decrypt, and crack classic ciphers — Caesar, Vigenère, Playfair, Morse, and more — with step-by-step visualization.

This is a workbench for pre-computer cryptography and common text encodings, from Caesar and Vigenère through Playfair and rail fence, plus Base64, Base32, hex, URL-encoding and Morse code — every transformation shown as a traceable sequence of steps rather than a single before-and-after box. None of the ciphers here were ever meant to resist a determined attacker with a computer, and the tool includes the attacks that break most of them right alongside the encoders.

How to decode a cipher when you don't know the key

  1. Paste the ciphertext into the Identify cipher tab. It checks for Morse, percent-escapes, binary, hex, Base32 and Base64 by their alphabets first, then scores anything with 20 or more letters by index of coincidence and chi-squared fit against English.
  2. If Caesar ranks first, go to Encode / decode, choose Caesar and open the brute-force table: it lists your text decoded under all 26 shifts, and the row that reads as words gives you the shift.
  3. If Vigenère ranks first, open Crack-assist. Compare the Kasiski key-length pills with the index-of-coincidence table for lengths 1 to 16, and click the length that both methods rank highly.
  4. Read the recovered key and decoded text. Each key letter is the Caesar shift that best fits English in its column, so a short sample can get a letter or two wrong; copy the key into the Vigenère decoder and adjust it there.
  5. For a monoalphabetic substitution, use the substitution crack-assist: start from the frequency-ranked suggested mapping and drag letter tiles until the live preview turns into English.

The ciphers, and what each one actually does

Caesar and ROT-N shift every letter by a fixed amount; Atbash mirrors the alphabet (A swaps with Z, B with Y, and so on) with no key at all. Vigenère repeats a keyword across the text, shifting each letter by the amount its corresponding keyword letter represents — effectively a different Caesar shift for every position. Rail fence writes the text in a zigzag across a chosen number of rows and reads it back off row by row. Monoalphabetic substitution maps each of the 26 letters to a different letter under a full custom alphabet, and Playfair encrypts letter pairs (digraphs) using a 5-by-5 keyed grid, with the historical rule that I and J share a cell and a filler letter — X, or Q if X would collide — gets inserted to break up a repeated pair or pad an odd final letter.

Every cipher runs both directions and returns a step-by-step trace alongside the output — which letter shifted by how much, which grid cell a digraph came from — so the point isn't just the answer, it's watching the mechanism that produced it.

Worked example: Caesar and Vigenère by hand

Number the alphabet A = 0 through Z = 25. A Caesar shift of 3 encrypts with C = (P + 3) mod 26 and decrypts with P = (C − 3) mod 26, so H (7) becomes K (10), E (4) becomes H (7), L (11) becomes O (14), and HELLO turns into KHOOR. The mod 26 handles the wrap at the end of the alphabet: X (23) plus 3 is 26, which is 0, so X encrypts to A.

Vigenère uses the same formula, but the shift K changes with every letter: C = (P + K) mod 26, where K is the value of the keyword letter written above P. With the keyword KEY (K = 10, E = 4, Y = 24) repeated across ATTACKATDAWN, the message encrypts to KXRKGIKXBKAL; the three rows below show each letter against its key letter.

Look at the two Ts in ATTACK: the first sits under E and becomes X (19 + 4 = 23), the second sits under Y and becomes R (19 + 24 = 43, and 43 mod 26 = 17). One plaintext letter, two ciphertext letters — that is the whole reason a plain frequency count fails against Vigenère.

Which cipher is this? Quick recognition guide

These are the same checks the Identify cipher tab runs, in roughly the order it runs them. Encodings are spotted by their alphabet alone; letter-only ciphertext needs at least 20 letters before the statistics mean anything.

Text encodings, done by hand against real bytes

Base64, Base32, hex (Base16), URL-encoding and binary are all implemented directly against the UTF-8 byte representation of your text using TextEncoder and TextDecoder, rather than calling the browser's built-in btoa/atob — which historically mishandles anything outside the Latin-1 byte range. That means encoding text with accented characters, emoji or non-Latin scripts round-trips correctly here in a way a naive btoa-based tool sometimes doesn't. Morse code is also included, mapped letter by letter against the standard International Morse table.

Cracking a cipher without knowing the key

For an unknown Caesar shift, brute force just tries all 26 possibilities and lets you read off the one that makes sense. Vigenère is harder because the key length is unknown too, so the tool runs two independent estimates side by side: Kasiski examination, which looks for repeated 3-to-5-letter substrings in the ciphertext and measures the spacing between their repeats (a substring that repeats because the same plaintext recurred at a multiple of the key length apart), and an index-of-coincidence scan across candidate key lengths 1 to 16, which measures how close each length's interleaved letter streams come to English's typical letter-repetition rate. Once a key length is chosen, the actual key is recovered by finding the best-fitting Caesar shift for each interleaved stream against standard English letter frequencies.

Monoalphabetic substitution gets a different kind of help: a bar chart comparing your ciphertext's letter frequencies against the standard English baseline, a suggested starting mapping built by pairing the most frequent ciphertext letters against English's most frequent letters (E, T, A, and so on), and a drag-to-map interface with a live decode preview that updates as you correct individual letter pairings by hand.

None of this is real security

Questions people ask about Classical Cipher Workbench

Is Vigenère actually secure if I use a long, random keyword?
No. Even a long random keyword doesn't fix Vigenère's fundamental weakness: repeated substrings in the plaintext still leak the key length through Kasiski examination and index-of-coincidence analysis, both included in this tool, and once the length is known each position reduces to a simple Caesar shift breakable by letter-frequency matching. Vigenère is a teaching cipher, not a security control.
Why does the tool implement Base64 itself instead of using the browser's built-in btoa function?
btoa and atob operate on Latin-1 code points, not UTF-8 bytes, so text containing accented letters, emoji or non-Latin scripts can corrupt or throw an error when passed through them directly. Encoding against the UTF-8 byte representation via TextEncoder instead means any text you type, in any script, encodes and decodes correctly.
How does the Playfair cipher handle the letters I and J?
Playfair's 5-by-5 grid only has room for 25 letters, so I and J are merged into a single cell historically — encrypting either produces the same grid position, and decrypting always returns I. The tool also automatically inserts a filler letter, normally X, between a repeated letter pair or after an unpaired final letter, matching the historical convention.
What's the fastest cipher on this page to crack without knowing the key?
Caesar and ROT-N, by a wide margin — there are only 26 possible shifts, so brute force just tries every one and a human reader picks out the shift that produces readable text. That's exactly what the brute-force tool here does: it shows all 26 decodings at once rather than making you guess and check one at a time.
What is ROT13?
ROT13 is a Caesar shift of exactly 13. The alphabet has 26 letters, so shifting by 13 twice lands back where you started, and the same operation both encodes and decodes. The ROT-N option here points this out when n is 13. It hides spoilers and punchlines, not secrets.
How can I tell if a message is Vigenère-encrypted?
Measure how often letters repeat. Ordinary English has an index of coincidence near 0.067, while a repeating-key Vigenère flattens the counts toward 0.038. The identifier flags Vigenère when 20 or more letters score below 0.052, and letter groups that recur at regular spacings are a second clue, which Kasiski examination measures.
What's the difference between the Caesar and Vigenère ciphers?
Caesar applies one shift to every letter, so a given plaintext letter always becomes the same ciphertext letter and there are only 26 keys to try. Vigenère changes the shift from letter to letter according to a keyword, so one plaintext letter can become several ciphertext letters, which hides the letter frequencies until the key length is known.
Who invented the Vigenère cipher?
Giovan Battista Bellaso described the repeating-keyword method in 1553. It was later credited to Blaise de Vigenère, a French diplomat who in 1586 published a stronger autokey cipher. Friedrich Kasiski published the first general attack on it in 1863, and that attack is one of the two key-length estimates this tool runs.

Related tools on BrakeTools

Content reviewed 2026-09-27.