Caesar Cipher
Encrypt decrypt
Encrypt decrypt Runs locally in your browser
About the
The Caesar Cipher shifts every letter in a message by a fixed number of places through the alphabet, wrapping around at Z back to A. It is the oldest documented cipher and still the clearest way to understand what substitution means, because the whole system is one number. Here you supply both the text and the shift: type your message, then a vertical bar, then the shift, for example hello|3. If you omit the shift, 3 is used, which is the value Caesar himself is said to have used. Treat it as a teaching tool and a puzzle device only; it is trivially breakable.
Where people use the
- Explaining how substitution ciphers work to someone learning.
- Solving or setting a puzzle or a geocache clue.
- Hiding a spoiler in plain sight from someone not paying attention.
- Checking a manual ROT13 or ROT-n result.
How to use the
- 1
Paste your text
Use the text area. There is no special input format to remember.
- 2
Choose encode or decode
Encoding shifts letters forwards. Decoding shifts them backwards by the same amount, so you do not have to work out the reverse shift yourself.
- 3
Set the shift
Drag the slider from 0 to 25, or click one of the shortcut buttons for ROT1, ROT3, ROT13 and ROT25.
- 4
Read the result
The output appears as you change anything, along with a note telling you which shift would undo it.
- 5
Try every shift if you do not know it
There are only 25 meaningful shifts, so sweeping the slider until the text looks like language is the whole of breaking this cipher.
Tips and best practices
- Remember that a shift of 13 is its own inverse, which is why ROT13 is used for spoilers.
- To reverse any shift n, apply 26 minus n.
- Leave spaces and punctuation in place; they are what makes the result readable as a puzzle.
Frequently asked questions
Why is 3 the default?
Because a shift of 3 is the one attributed to Julius Caesar in surviving accounts. It is a convention, not a mathematical requirement; any value from 1 to 25 works.
How do I decrypt without knowing the shift?
Try all 25 shifts and read the results. That takes seconds by hand and is why this cipher offers no real security. Frequency analysis, looking at which letters appear most often, is the systematic version of the same idea.
Are spaces and punctuation encrypted?
No. Only letters are shifted; digits, spaces and punctuation pass through unchanged. That is one reason the result is so easy to read once you know the method.
Does case survive?
Yes. Uppercase letters are shifted within the uppercase alphabet and lowercase within the lowercase one, so capitalisation is preserved.
Is this secure enough to send a real secret?
No, not remotely. It has 25 possible keys and no protection against frequency analysis. It is fine for puzzles, teaching and hiding spoilers from a casual glance.