Caesar Cipher, ROT13 and Simple Code Translator
Encode or decode a message with a Caesar shift, ROT13, Atbash, A1Z26 numbers or a Vigenere key word.
Text tools
Pick a cipher, type the message and copy the result. These are classic puzzle ciphers: fun for games and geocaches, but easy to break, so do not use them to protect anything private.
This Caesar cipher tool encodes and decodes messages with five classic letter ciphers: a Caesar shift from 1 to 25, ROT13, Atbash, A1Z26 and Vigenere with a key word. It is made for puzzles, escape rooms, geocaching clues and classroom exercises, not for keeping anything private.
Five ciphers applied to one message
Pick Encode or Decode, choose a cipher button and type. The table shows each cipher applied to Hello, World.
| Cipher | Rule | Result |
|---|---|---|
| Caesar shift 3 | Each letter moves 3 places forward | Khoor, Zruog |
| ROT13 | Each letter moves 13 places | Uryyb, Jbeyq |
| Atbash | A swaps with Z, B with Y | Svool, Dliow |
| A1Z26 | Letters become their positions | 8-5-12-12-15 23-15-18-12-4 |
| Vigenere, key LEMON | The shift changes with each key letter | Sixzb, Hsdzq |
How the Caesar cipher shift works
The Shift slider runs from 1 to 25 and starts at 3, the shift traditionally linked to Julius Caesar. Letters wrap round from Z to A, capitals stay capitals, and digits, spaces and punctuation are not touched.
Decode moves the letters back by the same amount, which is all it takes to undo a Caesar cipher.
ROT13, Atbash and A1Z26
ROT13 is a shift of 13, half the alphabet, so running it twice returns the original. Atbash reverses the alphabet and undoes itself the same way. ROT13 has long been used on forums to hide spoilers and punchlines.
A1Z26 writes each letter as its position, with hyphens between letters and spaces between words. Punctuation and digits are dropped. Decoding turns 1 to 26 back into capital letters and shows a question mark for any other number.
Vigenere with a key word
Vigenere uses a different shift for each letter, set by a key word of up to 30 characters. A means no shift, B means one, and so on, and the key repeats along the message. With the default key LEMON, ATTACKATDAWN becomes LXFOPVEFRNHR.
Only the letters in the key count, and spaces or punctuation in the message pass through without using up a key letter. The same key is needed to decode.
Related code tools include the Morse code translator, the binary translator and the mirror text generator. For a coded look without a cipher, see the hacker font styles, or browse the text tools page.
Cipher questions
How do I decode a Caesar cipher without knowing the shift?
Try each shift in turn. Choose Decode with Caesar shift selected, paste the message and move the slider from 1 to 25. One position will show ordinary words, and the number beside the slider is the shift.
Why did the numbers and punctuation in my message stay the same?
Caesar, ROT13, Atbash and Vigenere only change the letters A to Z. Digits, spaces, punctuation and accented letters are copied across as they are. A1Z26 instead drops everything that is not a letter.
Are these ciphers safe for passwords or private messages?
No. All five can be broken by hand or with simple tools, and a Caesar shift falls to 25 guesses. Use them for games and learning only, never for anything sensitive.
What does A1Z26 stand for?
The name describes the rule: A is 1 and Z is 26. Each letter is replaced by its place in the alphabet, so the word cab becomes 3-1-2. It is common in puzzle books and geocaching clues.
