DotDashKeySupport Us

Caesar Cipher Encoder & Decoder

Result appears here as you type.

To decode a message you received, set the shift to the negative of the sender’s shift (or 26 minus it) and paste the ciphertext in.

Move the shift slider and type a message to see it encoded; move it back to the same number on an encoded message to read it plainly again. A Caesar cipher shifts every letter a fixed number of places through the alphabet — shift 3 turns A into D, B into E, and wraps back around so X becomes A, Y becomes B, Z becomes C. It's named for Julius Caesar, whose own choice of shift value comes down to us from a specific Roman biographer rather than legend — this site's full Caesar cipher reference goes into that source in detail — making this one of the very few ciphers here with a named, dated historical user rather than just a general convention.

Why the Shift Number Is the Entire Key

There is nothing else to a Caesar cipher's secrecy beyond that single number. Once you know the shift, encoding and decoding are the same operation run in opposite directions: shift forward to encode, shift backward by the same amount to decode. That's also exactly why it's such a weak cipher by modern standards — with only 25 possible non-zero shifts (shifting by 0 or by 26 does nothing at all), someone trying to break an intercepted message doesn't need to be clever, just patient enough to try all 25 and see which one produces readable words.

ROT13: The Special Case That's Its Own Reverse

Shift 13 is mathematically special, because the alphabet has exactly 26 letters and 13 is half of 26. Encoding with shift 13 and decoding with shift 13 are literally the same operation — apply it twice to a message and you get the original text back exactly. That property made ROT13 popular in early internet forums and newsgroups during the 1980s and 90s as a lightweight way to hide spoilers, puzzle answers, or offensive jokes from a casual glance, not as real security, but as a one-click "don't read this unless you mean to" flag that any reader with a ROT13 tool could undo in a second. Set the shift slider here to 13 to see the same self-reversing behavior.

How Fast a Caesar Cipher Actually Breaks

With only 25 possible shifts, brute force alone — trying every shift and reading the results — cracks any Caesar-shifted message almost instantly by hand, and instantly by any computer. Even without brute force, a longer message gives away its shift through letter frequency: English text has a very consistent, well-documented distribution of letter frequency (E is the most common letter by a wide margin, followed by T, A, O and I), and a Caesar-shifted message preserves that distribution exactly, just relabeled. The 9th-century Arab scholar Al-Kindi is credited with the earliest known written description of using letter-frequency analysis to break exactly this kind of substitution cipher, in a treatise on cryptanalysis — meaning the technique for breaking a Caesar cipher is itself older than most people realize, predating the modern computer by over a thousand years.

A Worked Example, Shift 5

"MEET" shifted by 5 becomes "RJJY" — M moves 5 letters forward to R, E moves to J (twice, since E appears twice in MEET), and T moves to Y. Decoding "RJJY" means shifting backward by 5: R back to M, J back to E, J back to E, Y back to T. Try both directions on this word with the slider set to 5 to confirm the widget matches this by hand.

Caesar Cipher vs. a Real Encryption System

It's worth being direct about this: a Caesar cipher provides essentially no real security today and shouldn't be used to protect anything you actually care about keeping secret. Its value here is educational and recreational — puzzles, escape rooms, scouting badges, and as the simplest possible entry point into how substitution ciphers work generally, before tackling a keyword-driven cousin like Vigenère, where the shift changes from letter to letter instead of staying fixed for the whole message.

Frequently Asked Questions

Is shift 26 the same as no encryption at all?

Yes — shifting by 26 moves every letter all the way around the 26-letter alphabet back to itself, so a shift of 26 (or 0) produces output identical to the input. That is why the slider above stops at 25 in each direction: every distinct forward shift lives between 1 and 25, and the negative half of the range exists to decode rather than to add new shifts — setting -3 undoes a sender's +3, exactly as 23 would.

Does this tool preserve spaces, numbers and punctuation, or only shift letters?

Only letters are shifted; spaces, digits and punctuation pass through unchanged, matching how the historical cipher worked — it was designed to obscure a message's words, not its overall shape, which is part of why frequency analysis remains so effective against it.

Did Julius Caesar invent the idea of a shift cipher, or just use this specific one?

The specific number three is what history actually attributes to Caesar personally; the broader idea of swapping letters for concealment plausibly existed before him in some form. It's the documented, dated specificity of his own shift choice — not a claim that he invented substitution outright — that's why this particular version of the cipher carries his name.