ROT13 / Caesar Cipher
Encode, decode and crack ROT13, Caesar, Atbash and Vigenère
ROT13 / Caesar Cipher tool
Cipher text: 12 letters enciphered, 2 characters unchanged.
Rotates letters by a fixed amount, and digits by another. ROT13 is 13 and 0.
14 characters · 12 letters enciphered · 0 digits rotated · 2 passed through unchanged
Don't know the shift?
Fewer than 20 letters, so the scores are not meaningful yet and no row is marked as the answer — with a handful of letters a single unusual one decides the whole ranking. The rows are still here to read.
| Shift | Reads as | χ² | Use |
|---|---|---|---|
| 0 | Attack at dawn | 33.1 | Use |
| 15 | Leelnv le olhy | 43.5 | Use |
| 8 | Sllsuc sl vsof | 47.1 | Use |
| 7 | Tmmtvd tm wtpg | 56.4 | Use |
| 18 | Ibbiks ib liev | 80.8 | Use |
| 2 | Yrryai yr byul | 81.0 | Use |
| 19 | Haahjr ha khdu | 90.7 | Use |
| 21 | Fyyfhp fy ifbs | 99.6 | Use |
| 9 | Rkkrtb rk urne | 118.8 | Use |
| 12 | Ohhoqy oh rokb | 127.8 | Use |
| 24 | Cvvcem cv fcyp | 129.0 | Use |
| 25 | Buubdl bu ebxo | 165.9 | Use |
| 11 | Piiprz pi splc | 188.3 | Use |
| 6 | Unnuwe un xuqh | 196.3 | Use |
| 14 | Mffmow mf pmiz | 199.8 | Use |
| 5 | Voovxf vo yvri | 200.4 | Use |
| 16 | Kddkmu kd nkgx | 245.8 | Use |
| 13 | Nggnpx ng qnja | 248.1 | Use |
| 4 | Wppwyg wp zwsj | 260.1 | Use |
| 23 | Dwwdfn dw gdzq | 260.6 | Use |
| 22 | Exxego ex hear | 507.5 | Use |
| 17 | Jccjlt jc mjfw | 900.1 | Use |
| 20 | Gzzgiq gz jgct | 1215.0 | Use |
| 3 | Xqqxzh xq axtk | 1793.1 | Use |
| 1 | Zsszbj zs czvm | 1876.7 | Use |
| 10 | Qjjqsa qj tqmd | 1890.4 | Use |
Each row shows the first 120 characters. Shift 0 is included because “not enciphered at all” is a possible answer.
None of these ciphers is security. Every one of them is broken by the panel above, in the time it takes to render it — they are for puzzles, spoiler tags, CTFs and teaching. For anything that actually needs protecting, use real encryption.
ROT13 / Caesar Cipher: key facts
- What it does
- Encode, decode and crack ROT13, Caesar, Atbash and Vigenère
- Category
- Developer Tools
- Cost
- Free, with no account, sign-up, or install.
- Your data
- Runs entirely in your browser — the files and text you enter are never uploaded to a server.
- Last reviewed
- . Report an incorrect result.
Understanding the ROT13 / Caesar Cipher
Suetonius records that Caesar protected his correspondence by moving each letter three places along the alphabet. Two thousand years later the same trick survives as ROT13, the thirteen-place shift that turns up in spoiler tags, README jokes and the opening round of nearly every capture-the-flag competition. This tool applies the whole rotation family — Caesar at any shift, ROT13, ROT5, ROT18, ROT47, Atbash and Vigenère — and, when the key is missing, works it out for you.
That last part is the point. A Caesar has only twenty-six possibilities, so the honest way to attack one is to try them all, and the honest way to present the result is to say which one reads like English. Paste a ciphertext and every shift appears at once, each scored by how far its letter distribution sits from the distribution of written English; the closest match goes to the top with a star on it, and one click sets the direction to Decode and the shift to that number. What used to be twenty-five drags of a slider and a squint is now a table you read.
When nothing in that table reads, the Analyse tab explains why rather than leaving you to keep guessing. The index of coincidence measures how often two letters picked out of the text happen to match — around 0.067 for English, around 0.038 for random letters — and crucially it is untouched by any single-alphabet substitution, so a Caesar of English has exactly the index of the English. A low value therefore means more than one alphabet is in play and no shift will ever recover it, which is the signal to reach for Vigenère instead of trying harder.
Getting a result
- Paste your text and pick a direction — Encode to encipher, Decode to read something enciphered.
- Choose a preset — ROT13, ROT5, ROT18, ROT47, Caesar's own shift of 3, Atbash or Vigenère — or set the letter and digit rotations yourself.
- Don't know the shift? Look at the panel below the output: all 26 candidates, best first, with the χ² score beside each.
- Click the row that reads as English, or press "Crack it" to take the top one straight away.
- Open the Analyse tab when nothing reads — the index of coincidence will tell you whether a shift can work at all.
- Copy the result, download it as a .txt, or press Swap to send the output back through the other way.
Why twenty-six guesses beat one clever idea
A Caesar shift has a key space of twenty-six, of which one is the identity. That is not a weakness to be worked around; it is small enough that the complete search is the correct method, and any cleverer approach is wasted effort. What makes the search practical to read is scoring rather than eyeballing, and the score used here is Pearson's chi-squared: for each of the twenty-six letters, take how many times it appears in the candidate, subtract how many times English would predict, square the difference and divide by the prediction, then add up the results. A candidate close to English produces a small number; a candidate that is still gibberish produces a large one.
The reason this works at all is that a shift does not change the shape of a letter distribution, it only slides it sideways. English has a large spike at E, a smaller one at T, and a long tail through J, Q, X and Z. Enciphered at shift 7 that spike sits at L instead, but it is still one spike of the same height, so exactly one of the twenty-six rotations puts the spike back on E and every other rotation leaves it somewhere improbable.
Short texts are where this reasoning breaks, and the tool says so instead of pretending. Below twenty letters no row is marked as the answer: English predicts 0.015 occurrences of Z in a twenty-letter sample, so a single Z is enough to swamp the arithmetic and hand the crown to a wrong shift. The candidates are still listed, because on a short message a human reading five rows will beat the statistic — the tool just does not claim otherwise.
- Attack at dawn at shift 3 becomes Dwwdfn dw gdzq — the shift Caesar himself is reported to have used.
- ROT13 twice returns the original, which is why it needs no separate decode.
- ROT5 moves digits and not letters, so Order 66 becomes Order 11.
Reasons to use it here
- It breaks the cipher instead of asking you to: all 26 shifts are computed at once and ranked by how closely each one matches English letter frequencies, with the winner one click from being applied.
- Encode and Decode are real directions, so Swap moves the output into the input, flips the direction, and hands back exactly what you started with.
- The index of coincidence answers the question a shift search cannot — whether the text is one substituted alphabet or several — so you stop hunting for a shift that does not exist.
- Letters and digits rotate by separate amounts, which is all ROT5 and ROT18 have ever been, and ROT47, Atbash and Vigenère are there for the cases plain letter rotation cannot cover.
- Output can be uppercased, cut into five-letter blocks or stripped to letters for classic cryptogram presentation — and the tool tells you when that has made the result irreversible.
- Everything runs on your device with no dependencies, so nothing you paste is transmitted anywhere.
The rest of the family, and where the family ends
ROT13's relatives all answer the complaint that it leaves half the message alone. ROT5 rotates the ten digits by five, ROT18 does both at once, and ROT47 rotates every printable ASCII character — letters, digits and punctuation alike — by forty-seven, which is why it turns "Hello, World!" into "w6==@[ (@C=5P" and why it, like ROT13, is its own inverse. Here they are not separate code paths but names for two numbers: letters rotate by one amount and digits by another, and ROT18 is simply thirteen and five. Atbash, which reverses the alphabet so that A becomes Z, is older than all of them and needs no key at all.
Vigenère is the one that changes the game. Instead of one shift for the whole message, a repeating keyword supplies a different shift for each letter, so the same plaintext letter encrypts differently depending on where it falls. That flattens the letter distribution the chi-squared score depends on, which is exactly why the frequency panel and the index of coincidence are worth consulting before you spend time on shifts. This tool enciphers and deciphers Vigenère given the keyword; recovering an unknown keyword is a different piece of analysis and is not built in.
And then the family ends, deliberately. None of these ciphers is security, and the clearest demonstration of that is on the page itself: the panel that breaks a Caesar sits directly beneath the panel that creates one, and it finishes before you have let go of the mouse. They are the right tools for a spoiler tag, a puzzle hunt, a CTF warm-up or a lesson about why frequency analysis matters. For anything that genuinely needs to stay private, the answer is a modern cipher with a real key, not a shift.
- Atbash: Hello becomes Svool, and applying it again gives Hello back.
- Vigenère with the key LEMON turns ATTACKATDAWN into LXFOPVEFRNHR.
- An index of coincidence near 0.038 says no single shift will ever read the text.
Frequently Asked Questions
How do I decode a Caesar cipher when I don't know the shift?
Paste the ciphertext, leave the cipher on Caesar, and read the panel underneath the output. Every shift from 0 to 25 is listed with the text it produces and a χ² score measuring how English-like that text is, ordered with the best first and, provided there are at least twenty letters to judge by, the top row starred. Click any row to apply its shift, or press "Crack it" to take the top one. The number each row shows is the shift the message was enciphered with, so it goes straight into the Decode direction.
What does the index of coincidence tell me?
It is the probability that two letters drawn at random from the text are the same letter. English prose sits near 0.067; uniformly random letters sit near 0.038. Because swapping one alphabet for another does not change how often letters repeat, a Caesar, ROT13 or Atbash of English has the same index as the English did — so a value near 0.067 means a single-alphabet cipher and the shift search will find your answer. A value near 0.038 means several alphabets, and no shift will ever produce readable text however many you try.
What is the difference between ROT13, ROT5, ROT18 and ROT47?
They differ in what they touch. ROT13 rotates the 26 letters by 13. ROT5 rotates the 10 digits by 5 and leaves letters alone. ROT18 does both at once. ROT47 rotates all 94 printable ASCII characters — letters, digits and punctuation — by 47. All four are their own inverse, because in each case the rotation is exactly half the size of the alphabet it works on. In this tool the first three are just the two rotation amounts set differently.
Why does the tool say my output is lossy?
Because the presentation options change the text as well as enciphering it. Forcing uppercase throws away the original capitalisation, five-letter blocks throw away the original spacing, and "Letters only" removes punctuation and digits entirely. The result still deciphers into the right letters, but the shape of the original will not come back. Set Case to Preserve and Grouping to "As written" for a result that round-trips exactly.
Why did an accented word only partly change?
Because the cipher works on A–Z, so the plain letters of "café" shift and the é does not, leaving a word that is half enciphered. Switch on "Fold accents first" and é becomes e before the shift, so the whole word transforms — at the cost of losing the accent, which the cipher has no way to carry. The statistics under the output always say how many characters were passed through untouched, so the effect is visible either way.
Can I use any of this to keep something secret?
No, and the page is built to make that obvious: the panel that cracks a Caesar sits right under the panel that makes one, and it finishes instantly. These are encodings with a tiny key space, broken by anyone with a chart or a browser tab. Use them for spoiler tags, puzzles, CTF challenges and teaching. For real confidentiality use a modern authenticated cipher with a proper key.