Encrypt with Caesar's own shift of 3
attack at dawn
dwwdfn dw gdzq
Each letter moves 3 places forward: a → d, t → w, w → z.
Encrypt or decrypt text with any Caesar shift, or paste a message and let the solver try every shift and pick the one that reads like English.
All shifts
attack at dawn
dwwdfn dw gdzq
Each letter moves 3 places forward: a → d, t → w, w → z.
Wkh txlfn eurzq ira
The quick brown fox
Decrypting moves each letter back by the shift.
Brx fdq ghfrgh wklv phvvdjh zlwkrxw nqrzlqj wkh nhb
You can decode this message without knowing the key
The All shifts list ranks every shift by how English it looks and marks shift 3 as the most likely.
The Caesar cipher replaces each letter with the letter a fixed number of positions further along the alphabet, wrapping around from Z to A. That number is the shift, or key. With a shift of 3, A becomes D, B becomes E and Z becomes C. To decrypt, shift back by the same amount.
It is named after Julius Caesar, who, according to the Roman historian Suetonius, used a shift of 3 for his private letters. It is one of the oldest known ciphers and the classic starting point for learning cryptography.
Number the letters from 0 (A) to 25 (Z). With a shift n:
encrypt: E(x) = (x + n) mod 26decrypt: D(x) = (x − n) mod 26| Plain | A | B | C | D | E | … | W | X | Y | Z |
|---|---|---|---|---|---|---|---|---|---|---|
| Shift 3 | D | E | F | G | H | … | Z | A | B | C |
Letter case is kept, and spaces, digits and punctuation are not changed. With the Printable ASCII alphabet in this tool, the same idea is applied to all 94 characters from ! to ~, so digits and symbols are shifted too.
"ROT-N" is another name for a Caesar shift of N. ROT13 is the Caesar cipher with a shift of 13. It is special because 13 is half of 26: encrypting twice gets you back to the start, so the same operation encrypts and decrypts. ROT47 is the same idea applied to 94 ASCII characters with a shift of 47.
A Caesar cipher has only 25 useful keys, so it can always be broken, even without the key. There are two classic methods, and this tool uses both:
E, T, A and O are the most common letters, and Z, Q and X are rare. A shift keeps those proportions, just moved along the alphabet. The solver compares the letter frequencies of each candidate with typical English using a chi-squared test and marks the closest match as the most likely shift.Frequency analysis needs enough text to work. Very short messages (a word or two) can produce several plausible answers, so check the list yourself. It also assumes English: for other languages, the brute-force list is still correct, but the highlighted guess may not be.
The Caesar cipher offers no real security. With only 25 possible keys, anyone can break it in seconds, as this page shows. Use it for puzzles, games and teaching, never for real secrets.
function caesar(text, shift) { const k = ((shift % 26) + 26) % 26; // also works for negative shifts (decrypt) return text.replace(/[a-z]/gi, (c) => { const base = c <= 'Z' ? 65 : 97; return String.fromCharCode(((c.charCodeAt(0) - base + k) % 26) + base); });} caesar('attack at dawn', 3); // "dwwdfn dw gdzq"caesar('dwwdfn dw gdzq', -3); // "attack at dawn"def caesar(text: str, shift: int) -> str: out = [] for c in text: if c.isascii() and c.isalpha(): base = ord('A') if c.isupper() else ord('a') out.append(chr((ord(c) - base + shift) % 26 + base)) else: out.append(c) return ''.join(out) # Brute force: print every possible decryptionfor k in range(1, 26): print(k, caesar('dwwdfn dw gdzq', -k))The decrypted text is still unreadable
The shift is wrong, or the text is not a Caesar cipher. Switch to Decrypt and read the All shifts list. If no row is readable, the message may use a different cipher, such as Vigenère or a substitution cipher.
The solver picked the wrong shift
The message is probably too short or not in English, so letter frequencies are unreliable. Scan the full list of 25 shifts and click the readable one.
Digits and symbols were not shifted
The Letters alphabet only shifts A–Z. Choose Printable ASCII to shift every character from ! to ~.
Decrypting with the same shift gives garbage
Make sure you chose Decrypt, which shifts backwards. Encrypting again with the same shift moves the letters further instead (except for a shift of 13, which is self-inverse).
Choose Decrypt and paste the message. The tool lists all 25 possible shifts and highlights the one whose letter frequencies are closest to English. Click any row to use that shift.
A shift of 3, according to Suetonius: each letter was replaced by the one three places later, so A became D.
25 useful ones. A shift of 0 or 26 leaves the text unchanged, so there are only 25 different encryptions of any message, which is why it is so easy to break.
ROT13 is a Caesar cipher with a shift of 13. It is the only shift that is its own inverse in the 26-letter alphabet.
Not in the classic version, which only shifts letters. Choose the Printable ASCII alphabet in this tool to shift digits and symbols as well.
No. Encryption, decryption and the solver all run in your browser.
Free, private developer tools that run in your browser. No signup, nothing uploaded, no waiting.
Tip: press Ctrl D to bookmark dev247.