The Caesar cipher is one of the oldest ways to hide a message: every letter is shifted a fixed number of places through the alphabet, so A becomes D with a shift of 3. This free Caesar cipher encoder and decoder works with any shift from 1 to 25. Type a message, pick a shift and a direction, and press Encode or decode. Everything runs in your browser and nothing is saved or sent anywhere.
How to use this Caesar cipher encoder
Type your message in the box first, then set the shift — a whole number from 1 to 25. Choose “Encode a message” to hide a plain message, or “Decode a message” to read one that was encoded with the same shift. Press Encode or decode and the result appears straight away, with a note telling you which shift was used. Press Copy result to copy the answer. To decode a message, you must use the same shift that was used to encode it.
How it works
Each letter is moved forward through the alphabet by the shift amount, wrapping around at the end: with a shift of 3, A becomes D, X becomes A, and Z becomes C. Capital letters stay capital and small letters stay small, and numbers, spaces and punctuation are left exactly as they are. Decoding moves each letter backwards by the same amount, which undoes the encoding. A shift of 13 is special: encoding and decoding are the same operation, which is why it has its own name, ROT13. A shift of 0 or 26 would change nothing, so the tool only accepts shifts from 1 to 25.
Worked example
Type “Meet at dawn”, set the shift to 3 and choose “Encode a message”, then press Encode or decode — the answer is “Phhw dw gdzq”. Now choose “Decode a message”, paste “Phhw dw gdzq” back in with the same shift of 3, and press Encode or decode again — you get “Meet at dawn” back. Try “Hello” with a shift of 13 and you get “Uryyb”, the classic ROT13 result.
Frequently asked questions
What is the Caesar cipher?
The Caesar cipher is a simple substitution cipher named after Julius Caesar, who is said to have used it to send military messages. Every letter in the message is shifted the same number of places through the alphabet. It is one of the oldest known ciphers, and a good first step into cryptography.
Is the Caesar cipher secure?
No. There are only 25 possible shifts, so anyone can try them all in seconds and read the message. It is fine for puzzles, games and learning how ciphers work, but never use it to protect anything real. For real secrets, use proper modern encryption.
What is the difference between this and ROT13?
ROT13 is one special case of the Caesar cipher: the shift is always 13. With a shift of 13, encoding and decoding are the same step, because 13 plus 13 is 26, a full turn of the alphabet. This tool lets you use any shift from 1 to 25, including 13.
What happens to numbers and punctuation?
Nothing — they stay exactly as they are. Only the 26 English letters are shifted. Capital letters stay capital, small letters stay small, and digits, spaces and punctuation pass through unchanged, so the shape of the message stays readable.
Is my data private here?
Yes. The encoding runs entirely in your browser. Nothing you type is uploaded, stored or sent to any server.
What other tools can I use?
Try our ROT13 Encoder & Decoder for the classic shift-13 cipher, the Morse Code Translator for dots and dashes, the Base64 Encoder & Decoder for another way to encode text, and the Binary Converter to see text as 0s and 1s. See all of them on our tools page, use our free calculators, or return to the homepage.
Disclaimer: The Caesar cipher is a puzzle and learning tool, not real security — anyone can break it by trying all 25 shifts. Never use it to protect passwords, private messages or anything sensitive. No personal data is collected or saved.