SimplyCalculated.org

Caesar Cipher Translator

Shift every letter of your message by any amount — the cipher Julius Caesar used for military correspondence nearly two thousand years ago. Type on either side to encrypt or decrypt instantly, with ROT13 and other presets one tap away. Everything runs locally in your browser.

100% private: everything is processed in your browser's memory — nothing you enter is uploaded to a server, logged, or stored.

Caesar Cipher

Presets

Each letter is moved this many places forward in the alphabet. Typing into the Plain Text box encrypts; typing into the Ciphertext box decrypts.

What Is the Caesar Cipher?

The Caesar cipher is one of the oldest and simplest encryption techniques in recorded history. It is a substitution cipher in which each letter of a message is replaced by the letter a fixed number of positions further along the alphabet. Julius Caesar used a shift of 3 to protect messages to his generals, according to the Roman historian Suetonius, and his successor Augustus used a shift of just 1. Because it is so simple — and so easy to teach, apply, and solve — it remains the standard first cipher that people learn, whether in school, in puzzle books, or in the first chapters of any cryptography textbook.

Today the Caesar cipher is not used for real security; its importance is historical and educational. It introduces the core ideas that every later cipher builds on — a fixed transformation, a small number of possible keys, and the twin operations of encrypting and decrypting. Modern algorithms like AES are the distant descendants of this idea, with vastly larger key spaces and far more complex mathematics.

How the Caesar Cipher Works

The cipher treats the alphabet as a circle of 26 letters. Each letter is replaced by the letter n positions after it, wrapping around from Z back to A when necessary. Everything that is not a letter — spaces, digits, punctuation, emoji — stays exactly as it is. The two operations are exact inverses:

Operation Formula Meaning
Encrypt C = (P + n) mod 26 Each plaintext letter moves forward by n
Decrypt P = (C − n) mod 26 Each ciphertext letter moves back by n

Here "mod 26" just means "wrap around the alphabet": if you reach Z you continue from A. A shift of 0 leaves the text unchanged, and a shift of 26 is identical to a shift of 0 — there are only 25 genuinely different keys (1 through 25). Negative shifts work too: a shift of −3 is the same as a shift of +23, which is how this tool decrypts.

Step-by-Step Example

Suppose we encrypt the order "ATTACK AT DAWN" with the classic shift of 3 — exactly what Caesar himself would have done. Working letter by letter:

Plain A T T A C K D W N
Cipher (+3) D W W D F N G Z Q

Each letter simply steps three places forward: A → D, T → W, C → F, and so on. The spaces stay put, giving DWWDFN DW GDZQ. Try it in the tool above — set the shift to 3, type ATTACK AT DAWN into the Plain Text box, and the ciphertext appears instantly. Then paste the ciphertext into the Ciphertext box to watch it decode back to the original order.

ROT13 and Other Named Shifts

Certain shifts are common enough to have names. The best known is ROT13 (shift 13), which is its own inverse: because 13 is exactly half of 26, encrypting and decrypting are the same operation. Before the modern web, ROT13 was the de-facto way to hide jokes, spoilers, and puzzle answers on USENET newsgroups and early message boards — anyone who wanted to avoid a spoiler simply did not decode it. Variants extend the idea beyond letters: ROT5 rotates the digits 0–9, ROT18 combines ROT5 and ROT13, and ROT47 rotates the entire printable ASCII range so symbols are scrambled too.

The preset buttons above jump straight to ROT 1 (Augustus's shift), ROT 13, and ROT 25 (the inverse of ROT 1) — but every shift from 0 to 25 works in the shift box.

Example Reference Table

Plain Text Shift 3 Shift 13 (ROT13)
hello khoor uryyb
HELLO WORLD KHOOR ZRUOG URYYB JBEYQ
SimplyCalculated VlpsobFdofxodwhg FvzcylPnyphyngrq
Meet at midnight! Phhw dw plgqljkw! Zrrg ng zvqavtug!

Paste any plain-text value into the tool to confirm the ciphertext matches, or paste ciphertext into the Ciphertext box to confirm it decodes back. Notice that case is preserved and non-letters are untouched in every row.

How Secure Is the Caesar Cipher?

Not secure at all by modern standards — and it was never very secure even in Caesar's day. There are only 25 meaningful keys, so a determined adversary can simply try them all, an attack called a brute-force search. A second weakness is that the cipher preserves the frequency of letters: the most common letter in English, E, appears roughly 13% of the time, so the most frequent letter in any decent-length Caesar ciphertext is almost certainly E. Counting letters (frequency analysis) reveals the shift without trying anything. A third giveaway is that word boundaries remain visible because spaces are not encrypted. Against any of these attacks the cipher collapses in minutes by hand — and instantly by computer.

This is exactly why the cipher is still worth understanding: it demonstrates, in miniature, every idea that makes modern ciphers strong. AES, for example, also maps plaintext to ciphertext using a key — but its key space is so vast (2128 or more possibilities) that brute force is physically infeasible, and its design deliberately smears letter frequencies so analysis like the above fails completely.

Troubleshooting & Common Mistakes

Why doesn't my decrypted text look right?

The most common error is mixing up the direction: a message encrypted with shift 3 must be decoded with shift 3 (not 23). In this tool the direction is handled for you — typing into the Ciphertext box always decrypts with the shift shown — so if the output is still gibberish, check that the shift matches the one the sender used.

What if the message contains uppercase and lowercase?

Case is preserved exactly: "Hello" becomes "Khoor", never "kHOOR" or "KHOOR". The shift applies to the letter position, not the case, so mixed-case messages round-trip cleanly.

What about letters near the end of the alphabet?

They wrap around: X, Y, Z shifted by 3 become A, B, C. The same wrapping works in reverse, so A shifted by −3 becomes X. This tool wraps automatically in both directions.

Can I use shifts larger than 25?

You can type any number, and the tool reduces it modulo 26 — a shift of 29 behaves exactly like 3, and 52 like 0. Only 0–25 produce distinct results, so the shift box is capped at 25 to keep things clear.

How This Cipher Compares to Other Classical Ciphers

The Caesar cipher is one of several classical ciphers covered on this site — each uses a different mechanism, so understanding how they relate makes it easier to see why some are trivially breakable and others held up for centuries.

Cipher Mechanism What Makes It Different
Caesar Cipher (this page) Substitution Shifts every letter by one fixed number (the key) through the alphabet — the simplest classical substitution cipher.
Atbash Cipher Substitution (fixed) A special case of substitution with no key at all — it always mirrors the alphabet (A↔Z, B↔Y, ...).
Vigenère Cipher Polyalphabetic substitution Repeats a keyword to shift each letter by a different amount, defeating simple frequency analysis that breaks Caesar.
Beaufort Cipher Polyalphabetic substitution (reciprocal) A variant of Vigenère's idea that is self-reciprocal — the same operation both encrypts and decrypts.
Playfair Cipher Digraph substitution Encrypts letters two at a time using their positions in a 5×5 key square — the first practical digraph cipher (1854).
Affine Cipher Mathematical substitution Encrypts using a linear function (ax + b mod 26) with two keys instead of one shift value.
ROT47 Substitution (extended range) Applies a Caesar-style shift across the full printable ASCII range, not just letters — used to obfuscate text online (e.g. spoilers), not for security.
Rail Fence Cipher Transposition Rearranges letter order in a zigzag pattern instead of substituting letters — a fundamentally different technique from every cipher above.
A1Z26 Encoding (not a cipher) Simply maps each letter to its position number (A=1...Z=26) — a puzzle/encoding convention, not intended for real secrecy.
NATO Phonetic Alphabet Encoding (not a cipher) Replaces each letter with a spoken code word (Alfa, Bravo, Charlie…) for reliable voice transmission on noisy radios — built for clarity, not secrecy.

Frequently Asked Questions

What is the difference between encoding and encrypting with a Caesar cipher?
Nothing is kept secret from someone who knows the method. The Caesar cipher has only 25 possible shift values (plus shift 0, which changes nothing), so an attacker can simply try every shift until the message reads clearly — even by hand, that takes minutes. It is a cipher in the historical sense, but against a computer it offers essentially no security. Use it for puzzles, games, and hiding text from casual readers, not for protecting anything sensitive.
Does the shift go forward or backward when decrypting?
Decrypting uses the opposite direction from encrypting. If you encrypted with a shift of 3 (each letter moved three places forward), you decrypt by moving three places backward. In this tool you never have to think about it: type plain text and it encrypts with the shift shown, or type ciphertext and it decrypts with the same shift. If you ever do it by hand, just remember that the shift number only describes the encryption direction.
What is ROT13?
ROT13 is just the Caesar cipher with a fixed shift of 13. Because the alphabet has 26 letters, shifting by 13 is its own inverse: applying ROT13 twice restores the original text, and decrypting is identical to encrypting. That self-inverse property made it popular on the early internet for hiding spoilers, puzzle answers, and punchlines from people who did not want them spoiled — the text looks like gibberish at a glance, but anyone who wants can decode it instantly.
Why do spaces and punctuation stay the same in my encrypted text?
Classic Caesar encryption only permutes the letters and leaves everything else untouched, so the word boundaries of your message remain visible in the ciphertext. That is a genuine weakness — it gives a codebreaker a strong hint about word lengths — but it is also the traditional convention, and it keeps the output readable and reversible. This tool follows that convention, and our decrypt function expects it: any ciphertext produced by moving only letters can be decoded with the same shift.
How do I figure out the shift from a message I did not encrypt?
The quickest approach is brute force: write down the message shifted by every possible value from 1 to 25 and look for the one that reads as English. With this tool, set the shift to 1, paste the ciphertext into the Ciphertext box, then keep pressing the shift up until the Plain Text box shows something meaningful. A more sophisticated method is frequency analysis — in any normal English text the letter E appears far more often than others, so the letter that shows up most in your ciphertext is very likely E, and the distance between them is the shift.
Does this tool work with numbers, emoji, or non-English alphabets?
Digits, emoji, accented letters, and non-Latin scripts pass through the cipher unchanged because the classic Caesar cipher only applies to the 26 letters of the Latin alphabet. For example, "Hello, 2024! 🌍" shifted by 3 becomes "Khoor, 2024! 🌍". If you need to encrypt digits too, look at ROT47, a modern extension that rotates all printable ASCII characters instead of just letters.
Is my text sent anywhere?
No. Every shift happens instantly in your browser using plain JavaScript — nothing you type is uploaded, logged, or stored. You can safely paste confidential text here for testing because it never leaves your device; just remember that the Caesar cipher itself provides no real confidentiality.

Formula last verified August 22, 2026 against our published methodology .