Tools
Classical cipher decoder
Crack Caesar, Vigenère, Atbash and other classical ciphers by hand or with auto-detection.
Enter ciphertext above to see ranked decoding candidates.
Auto-detection is designed for English text: candidates are ranked by English-likeness (letter frequency and common words), so a message in another language may not show up or may score low. If so, use the Manual tab. Vigenère key recovery uses the Index of Coincidence and works best on ciphertext longer than about 50 letters.
About this tool
This tool decodes (and encodes) messages written with the classic methods: Caesar, ROT13, ROT47, Atbash, Vigenère, affine and rail fence, plus Morse code, A1Z26, Bacon’s cipher and encodings such as Base64, Base32, hex and binary. It comes in handy for puzzle hunts, geocaches and escape rooms, CTF challenges, cryptography homework or the odd mysterious string you stumble across online.
Paste your text into Input. The Auto-decode tab lists candidates ranked by likelihood, each with a confidence bar and the recovered key where there is one; Tweak in Manual sends a candidate to the other tab. In Manual you choose the cipher, the direction (decode or encode) and its parameters: the Caesar shift, the Vigenère key, the affine a and b values or the number of rails.
Everything runs in your browser; the text is never sent to a server. Auto-detection scores results against English letter frequencies and common English words, so it works best on English plaintext and may miss messages in other languages, in which case use Manual mode. Playfair, Hill, Enigma and custom-alphabet substitution ciphers are not included.
How do I decode a Caesar cipher?
- Type or paste the message into “Input”. The “Paste” button brings it straight in from the clipboard.
- On the “Auto-decode” tab, the tool tries all 25 possible shifts and shows up to three that look most like English, with a name such as “Caesar (shift 7)” and a confidence bar.
- If the message is not in English and no readable candidate appears, open the “Manual” tab, choose “Caesar” under “Cipher” and leave “Decode” selected under “Direction”.
- Change the “Shift (1–25)” number until the “Output” reads properly, then copy it with “Copy”.
How does the Caesar cipher work?
The Caesar cipher replaces each letter with the one a fixed number of places further along the alphabet. With a shift of 3, A becomes D, B becomes E, and Z wraps round to the start and becomes C. To decode, you do the opposite: count the same number of places back. ROT13 is the Caesar cipher with a shift of 13, which undoes itself when applied again.
The tool works with the 26-letter English alphabet. It keeps upper and lower case, and leaves numbers, punctuation and letters outside that alphabet, such as ñ or accented vowels, unchanged.
How do I break a Vigenère cipher without the key?
Vigenère applies a different Caesar shift to each letter according to a repeating keyword. With the key LEMON, the first letter is shifted 11 places (L), the second 4 (E), the third 12 (M), and so on until the key starts again.
Without the key, auto-decode tries key lengths from 2 to 10 letters, picks the most likely one using the Index of Coincidence and solves each position as if it were a Caesar cipher. If it finds a convincing key, the “Vigenère” candidate appears with the key beside it. “Tweak in Manual” copies it into the “Key” field on the “Manual” tab, where you can correct a letter. With fewer than 20 letters it does not try.
How do I encode a message for a game or treasure hunt?
- Type the message into “Input”.
- Open the “Manual” tab and choose the method under “Cipher”. They are grouped into “Classical”, “Codes” and “Encodings”.
- Under “Direction” press “Encode” and set whatever the method needs: the Caesar shift, the Vigenère key, the a and b values of “Affine”, or the number of “Rails (2–10)” for rail fence.
- Copy the “Output” with “Copy”. To check it, paste it into “Input”, press “Decode” with the same settings and the original message should come back.
Frequently asked questions
How do you decode a Caesar cipher without knowing the shift?
There are only 25 possible shifts, so you can try them all and keep the one that reads as real text. Auto-decode does exactly that and shows you the three most likely results.
How can I tell which cipher a message uses?
Look at the characters: only dots and dashes means Morse, only 0s and 1s is usually binary, letters and digits ending in = suggest Base64, and only A and B points to Bacon. If it is all letters it could be Caesar, Atbash, Vigenère or another alphabet cipher, so paste it in and compare the candidates.
Can Vigenère be broken without the key?
Yes, if the ciphertext is long enough. The tool estimates the key length with the Index of Coincidence and then solves each position as a Caesar shift; it works best above roughly 50 letters of English text.
Is Base64 a cipher?
No, it is an encoding: anyone can reverse it without a key. That is why it sits in the Encodings group with Base32, hex and binary, separate from the classical ciphers.