Caesar cipher and other classic ciphers

Encode or decode a message with a classic cipher: Caesar (shift every letter), Vigenère (shift by a keyword) or Atbash (reverse the alphabet). The text is processed in your browser and nothing is uploaded.

Method
Direction

How it works

  1. Type your message

    Type or paste the text you want to encipher or decipher.

  2. Choose the method

    Caesar (shifting), Vigenère (with a keyword) or Atbash (the alphabet reversed).

  3. Copy the result

    The result appears straight away. Switch direction to make a message readable again.

The three ciphers

  • Caesar: every letter moves a fixed number of places in the alphabet. With a shift of 3, A becomes D, and Meet at the bridge becomes Phhw dw wkh eulgjh. A shift of 13 is ROT13.
  • Vigenère: like Caesar, but the shift changes with each letter, following a keyword. With the key SECRET, letters are shifted by S, E, C, R, E, T in turn, which defeats simple frequency counting.
  • Atbash: the alphabet is mirrored, so A becomes Z, B becomes Y and so on. There's no key.

Choose Decipher to reverse it. Only the letters A–Z change; digits, punctuation, spaces and accented letters stay as they are.

Examples

Method Input Output
Caesar, shift 3 Khoor Zruog (decode) Hello World
Vigenère, key LEMON Attack at dawn Lxfopv ef rnhr
Atbash Hello World Svool Dliow

History and breaking

Julius Caesar used a shift of three for military messages. With only 25 possible shifts, anyone can try them all. Vigenère was long thought unbreakable, but it too fell to frequency analysis in the 19th century.

Not real security

These ciphers are centuries old and easy to break, so use them for puzzles, games and teaching, not for secrets. To protect text properly, use encrypt text. For a quick swap of letters in the middle of the alphabet, see the shorthand version: ROT13.

Frequently asked questions

How do I break a Caesar cipher without the shift?

Try all 25 shifts: only one gives readable text. You can also look for the most frequent letter, which is usually E in English, and shift it back from there.

How does the Vigenère key work?

The key letters are used one after another and repeat. With the key LEMON, `Attack at dawn` becomes `Lxfopv ef rnhr`: A is shifted by L, T by E, T by M and so on. Spaces and punctuation do not use up a key letter.

Which letters are changed?

Only A–Z, keeping their case. Digits, punctuation, spaces and accented letters stay as they are.

Is Atbash the same as reversing the text?

No. It mirrors the alphabet, A to Z and B to Y, but keeps the order of the letters: `Hello World` becomes `Svool Dliow`.