Popular right now

Converters

Caesar Cipher Encoder / Decoder

Type or paste text, pick a shift from 1 to 25, and see the encoded and decoded results update live.

Ready to useFree · No sign-up
Shift3
Encoded (shift +3)

Encoded text appears here

Decoded (shift −3)

Decoded text appears here

Brute-force all 25 shifts

Enter some text above to see it decoded at every shift.

Letters keep their case; numbers, spaces, and punctuation pass through unchanged. Everything runs in your browser.

Works in your browser. No account needed.

Frequently asked questions

How does a Caesar cipher work?

Each letter is replaced by the letter a fixed number of places further along the alphabet, wrapping from Z back to A. With a shift of 3, A becomes D, W becomes Z and X wraps round to A, so HELLO becomes KHOOR. Decoding shifts back by the same amount: KHOOR with shift 3 decodes to HELLO.

How do I decode a Caesar cipher without knowing the shift?

Paste the ciphertext and open the brute-force panel: it lists the text decoded at all 25 shifts, and the one row that reads as normal language is the answer — its shift number is the key. With a short message two rows can look plausible; add more of the ciphertext and only one will survive.

Should I use the Encoded or the Decoded output?

Use the Encoded output to turn plain text into a secret message, and the Decoded output to turn a received message back into plain text, with the same shift the sender used. The two are mirror images: encoding with shift 3 is the same as decoding with shift 23, because 3 + 23 = 26 brings every letter back round the alphabet.

What is ROT13 and why does it have its own button?

ROT13 is a Caesar cipher with a shift of exactly 13, half of the 26-letter alphabet. That makes it its own inverse: applying it twice returns the original, so the Encoded and Decoded outputs show the same text. It is used to hide spoilers, puzzle answers and punchlines in forums and newsgroups — URYYB is HELLO in ROT13.

Does it handle numbers, punctuation, accents and mixed case?

Uppercase and lowercase letters A–Z are shifted and keep their case, so “Hello, World!” with shift 1 becomes “Ifmmp, Xpsme!”. Digits, spaces, punctuation and accented or non-Latin letters such as é, ß or Cyrillic pass through unchanged, matching the classical cipher, which only ever covered the 26 Latin letters.

How can I break it by hand, without trying every shift?

Use letter frequency. In English, E is the most common letter, followed by T and A. Find the most frequent letter in a longer ciphertext and assume it stands for E: if it is H, the shift is 3. A one-letter word is almost always A or I, which gives a second quick check. Confirm the guess with the Decoded output.

About this tool

The Caesar cipher replaces each letter with the letter a fixed number of places along the alphabet. It is named after Julius Caesar, who, according to the Roman historian Suetonius, used a shift of three in private letters. This page shows both directions at once — the Encoded output shifts forward and the Decoded output shifts backward by the chosen amount — so you never need to work out which way a message was transformed. The slider covers every useful key from 1 to 25; a shift of 0 or 26 would leave the text unchanged.

Worked example with a shift of 7: ATTACK AT DAWN encodes to HAAHJR HA KHDU. Each letter moves seven places: A→H, T→A (wrapping past Z), C→J, K→R, D→K, W→D, N→U. Paste HAAHJR HA KHDU with the slider on 7 and the Decoded output returns ATTACK AT DAWN. Spaces and punctuation are kept, which is why word lengths remain visible — the classic weakness a puzzle solver exploits first.

Breaking the cipher is easy because there are only 25 possible keys. The brute-force panel decodes the input at every one of them in a single table, so you scan down until a row makes sense. That is also why the Caesar cipher is used for teaching rather than protection: a computer, or a patient person, can try every key in seconds. Its descendants — ROT13, the Vigenère cipher, which uses a different shift for each letter of a keyword, and the shift ciphers found in escape rooms, geocaching puzzles and CTF challenges — all start from this idea.

When solving a puzzle, paste the whole ciphertext rather than a fragment, because a longer text makes the correct brute-force row stand out immediately. If no row reads correctly, the message probably is not a plain Caesar shift: it could be a Vigenère cipher, an Atbash substitution (A↔Z, B↔Y), or text that was reversed before shifting. Everything is calculated in your browser as you type.

Related tools