Text Tools
ROT13 & Caesar cipher.
Shift every letter forward by a set amount. Default to classic ROT13 (shift 13), or pick any shift from 1-25 for a general Caesar cipher.
Input
Output
Enter text, set a shift, then Encode or Decode.
Why ROT13 decodes itself
ROT13 shifts every letter 13 places through the alphabet — exactly half of 26. Shift once and you get ciphertext; shift that same result by 13 again and the letters land right back where they started. That's why running this tool twice on the same shift always returns your original text, and why ROT13 (unlike a general Caesar cipher) needs only one button for both directions. Numbers and punctuation are left untouched.
Worked example: HELLO with shift 13, and a shift-3 sentence
With the default shift of 13, HELLO becomes URYYB (H moves 13 places to U, E to R, L to Y, O to B). Run URYYB through the same shift and you get HELLO back, because 13 + 13 = 26, a full turn of the alphabet. With a shift of 3, ATTACK AT DAWN becomes DWWDFN DW GDZQ; to decode it you shift back by 3 (or forward by 23). Spaces and punctuation are left as they are.
| Input | Shift | Output |
|---|---|---|
| HELLO | 13 | URYYB |
| URYYB | 13 | HELLO |
| ATTACK AT DAWN | 3 | DWWDFN DW GDZQ |
| ZEBRA | 1 | AFCSB |
Related tools: Morse code translator, NATO phonetic alphabet, binary converter, braille translator.
How this is calculated
Each letter A to Z is numbered 0 to 25, the shift is added modulo 26, and the result is turned back into a letter, keeping upper or lower case. Decoding subtracts the shift. The cipher is named for Julius Caesar: Suetonius, Life of Julius Caesar 56, says he wrote secret messages by putting D for A and so on through the alphabet, a shift of 3 (text at LacusCurtius, checked 25 October 2026). With only 25 possible shifts it offers no real security; use it for puzzles and spoilers, not secrets.
Brute force: decode KHOOR with every possible shift
Suppose you meet the ciphertext KHOOR and do not know the shift. There are only 25 shifts to try, and only one of them gives a word.
| Decode shift | Result | Decode shift | Result |
|---|---|---|---|
| -1 | JGNNQ | -14 | WTAAD |
| -2 | IFMMP | -15 | VSZZC |
| -3 | HELLO | -16 | URYYB |
| -4 | GDKKN | -17 | TQXXA |
| -5 | FCJJM | -18 | SPWWZ |
| -6 | EBIIL | -19 | ROVVY |
| -7 | DAHHK | -20 | QNUUX |
| -8 | CZGGJ | -21 | PMTTW |
| -9 | BYFFI | -22 | OLSSV |
| -10 | AXEEH | -23 | NKRRU |
| -11 | ZWDDG | -24 | MJQQT |
| -12 | YVCCF | -25 | LIPPS |
| -13 | XUBBE |
What the table is. Each row is this page’s own decode (each letter moved back by the shift, wrapping from A to Z) applied to KHOOR. Shift -3 gives HELLO; the other 24 rows are letter noise.
Why it matters. The whole key space is 25 shifts, so a person can read the 25 rows above in under a minute and a program in a fraction of a millisecond. For comparison AES-128 has 2128, about 3.4 × 1038, possible keys. That gap is why Caesar and ROT13 hide text from a glance and protect nothing.
Another example: what changes and what does not
With ROT13 (shift 13), Meet at 9:30, Pier 4! Café Z becomes Zrrg ng 9:30, Cvre 4! Pnsé M. Case is kept, the digits, spaces, comma, colon and exclamation mark are untouched, and the accented é is left as it is because the tool only moves the 26 letters A to Z and a to z. Running ROT13 on the result returns the original text. To undo any other shift k, encode with 26 − k: encoding HELLO with 3 gives KHOOR, and encoding KHOOR with 23 gives HELLO again.
What it does not show. It does not tell you which shift an unknown message used: you have to recognise the readable row yourself, which is harder in a language you do not read. Accented and non-Latin letters pass through unchanged, so a French or Cyrillic message is only partly shifted.
What to do. Use ROT13 for spoilers and puzzles, where anyone can reverse it on purpose. For anything private use real encryption, not a letter shift.
Frequently asked questions
What is ROT13?
A Caesar cipher with a shift of 13. Because the alphabet has 26 letters, applying ROT13 twice returns the original text.
How do I decode a Caesar cipher if I do not know the shift?
Try all 25 shifts. Only one gives readable text, so you can find it in seconds.
Does it change numbers or punctuation?
No. Only the letters A to Z are shifted; digits, spaces and symbols stay the same.
Is ROT13 encryption?
Not in any useful sense. It hides text from a casual glance only, and anyone can reverse it.