Caesar Cipher Encoder / Decoder
Encrypt or decrypt text with a Caesar shift (0-25), use the ROT13 preset, or brute-force an unknown shift by seeing all 25 rows at once. Runs entirely in your browser.
- Free, no account
- No watermark
- No usage limit
About the Caesar Cipher Encoder / Decoder
Most people who open a Caesar cipher decoder have the same problem. They've got a scrambled message and no idea what shift produced it. A lot of tools are useless for exactly that moment, because they ask you for the key you don't have, or they make you click through shift 1, shift 2, shift 3 until something reads. This one skips that, so you paste the ciphertext, click Try all 25 shifts, and every possible decoding lands in one table, where exactly one row reads as plain English. That row is your answer, and it has its own copy button.
The reason that single button cracks any Caesar cipher is the same reason the cipher keeps nothing secret, which is that it has only 25 keys. Shift a letter one place, or two, or up to twenty-five, and that's the entire set of possibilities, so a computer runs through all of them before you blink. Use it to learn how ciphers work, to crack a puzzle clue, or to keep a movie spoiler hidden from anyone scrolling past. Don't use it to protect anything you'd genuinely mind a stranger reading. If that's what you're after, there's an AES tool and a hash generator linked at the bottom. Everything here runs in your browser, so nothing you type is uploaded, stored, or logged.
How to use
- Pick a direction. Encrypt scrambles a plain message. Decrypt turns a coded one back. The two buttons up top switch between them, and the box labels change to match so you always know which way you're going.
- Set the shift. Type a number from 0 to 25, or drag the slider. Three is the classic Caesar shift and the default. Zero does nothing, since shifting a letter zero places leaves it where it was.
- Type or paste your text. The output updates on every keystroke. No submit button, no waiting.
- Copy the result. One click on Copy result grabs the output. Case stays intact, and anything that isn't a letter (spaces, numbers, punctuation) comes through untouched.
- Want ROT13? The preset button jumps straight to shift 13 in encrypt mode, no need to set anything by hand.
- No key? Brute-force it. Paste the ciphertext and click Try all 25 shifts to see every decoding at once, then scan for the row that reads as words.
Cracking a message when you don't know the key
A friend sends you a line of gibberish, or you hit a locked clue in a puzzle hunt, all you know is that it's a Caesar cipher, and you don't have the shift, which is where most decoders leave you stranded.
The Try all 25 shifts button runs every key at once and stacks the results in a table, shift 1 down to shift 25, with the decoded text beside each, and your eye does the rest. Real English stands out from nonsense fast, so you read down the column, find the row that forms a sentence, and copy it straight from the button next to it. On a short message that's a five-second job.
For longer ciphertext there's a shortcut worth knowing, and it doesn't need the tool at all. It's called frequency analysis. In English the letter E turns up more than any other, then T, A, O. A Caesar cipher shifts every letter by the same amount, so it never hides those frequencies, it just renames them. Count the most common letter in the coded text, assume it stands in for E, and the distance between them is your shift. Arab scholars worked this out more than a thousand years ago, so the method is nothing new.
There's an even lazier tell. Because the cipher leaves spaces alone, word shapes leak straight through. A single-letter word is almost always A or I, and a three-letter word sitting where "the" would go probably is "the". Those small cribs collapse a message with no counting at all.
ROT13, the one shift worth remembering
ROT13 is a Caesar cipher stuck at shift 13, and it has a quirk that made it stick around. Thirteen is exactly half of 26, so running ROT13 on text twice brings the original right back. Encrypting and decrypting are the same action, you never have to track which direction you're in, which is why the preset here doesn't bother with a separate decrypt mode.
Its actual job was never secrecy. Back in the Usenet days people used ROT13 to hide text that shouldn't be read by accident, a movie's ending, a joke's punchline, the answer to a riddle someone posted. Scrolling past it you'd see gibberish, and anyone who actually wanted the spoiler could decode it in a second. That convention is still alive in forum corners today, and ROT13 also turns up as a warm-up round in capture-the-flag security challenges.
A two-thousand-year-old toy
The cipher takes its name from Julius Caesar, who reportedly used a shift of 3 for military messages. It held up well enough at the time, mostly because most of his enemies couldn't read, never mind reason about letter substitution. Once frequency analysis was written down in the medieval period, this whole class of cipher was solved for good.
So the Caesar cipher lives in classrooms and puzzle boxes now, and that's the right home for it. It's usually the first cipher anyone learns, because you can understand it completely in a couple of minutes and see why it fails a minute after that. Encrypt a sentence, brute-force it, and watch the plaintext fall out of the table. That loop teaches more about how encryption works, and how it breaks, than any diagram.
Frequently asked questions
Can I use one shift for uppercase and a different one for lowercase?
No. A Caesar cipher uses a single shift for the whole alphabet, and this tool follows that. Uppercase and lowercase are handled as separate tracks only so an uppercase letter stays uppercase after shifting and lowercase stays lowercase, but both move by the same amount. If you want different rules per case, or a shift that changes from letter to letter, you're describing a different cipher.
Why do numbers and symbols come out unchanged?
Because a classic Caesar cipher only touches the 26 letters A to Z. Digits, spaces, punctuation, emoji, and line breaks aren't part of the alphabet it rotates, so they pass through exactly as typed. That keeps the message readable, though it also hands an attacker the word lengths, which is one more reason the cipher falls so fast. If you need the digits scrambled too, you'd want a cipher that works on a bigger character set.
What's the difference between a Caesar cipher and a substitution cipher?
A Caesar cipher is the simplest kind of substitution cipher, the one where the whole alphabet slides by a fixed amount. A general substitution cipher scrambles the alphabet in any order, so A might map to Q and B to F with no pattern linking them. That has vastly more keys and can't be brute-forced 25 ways, but frequency analysis still breaks it, just with more counting. Think of the Caesar as the beginner's version.
My decoded text is still gibberish. What now?
Nearly always a wrong shift. Check that you're in Decrypt mode and that the shift matches the one used to encrypt. If you don't know the key, stop guessing, click Try all 25 shifts and read the rows. And if none of the 25 rows makes sense, the message probably isn't a plain Caesar cipher at all. It might be a keyword cipher like Vigenère, a full substitution, or an encoding like Base64, each of which needs a different tool to unravel.
Is a shift of 26 the same as no shift?
Yes. Shifting by 26 walks the whole way around the alphabet and lands every letter back where it started, so it's identical to a shift of 0. That's why the tool keeps the range at 0 to 25, since 26 and up just repeat values you already have. A shift of 27 equals 1, 28 equals 2, and so on around the loop.
Can I layer two shifts so it takes two steps to read?
Not with plain Caesar shifts, no. Applying one shift and then another just adds up to a single combined shift, so a shift of 3 followed by a shift of 4 is the same as a shift of 7, and layering them buys you nothing. Real ciphers get their strength from varying the shift across the message, which is what a Vigenère cipher does with a keyword. If you want more than a puzzle-grade scramble, that's the direction to look.
Does the Try all 25 shifts button run on a server?
No, that runs on your device, same as the single-shift box does. Your browser works out all 25 decodings locally and never sends the ciphertext anywhere, and the Copy result button just passes the text to your system clipboard. So there's nothing here to intercept, but that privacy does nothing for the cipher itself, which a child could still break, so keep anything sensitive out of it.