Caesar Cipher
Shift
How to Use
- Enter the text you want to encrypt or decrypt
- Set the shift value (default is 3, meaning A→D, B→E)
- Click "Encode" or "Decode"
- Click "Copy" to copy the result
How It Works
The Caesar cipher is one of the oldest substitution ciphers, invented by Julius Caesar. It encrypts text by shifting each letter in the alphabet by a fixed number of positions.
Example (shift = 3):
- Plaintext:
HELLO WORLD - Ciphertext:
KHOOR ZRUOG
Features
- Only shifts English letters (A-Z, a-z), preserves case
- Numbers, spaces, and punctuation remain unchanged
- Shift range 1-25; a shift of 26 equals no encryption
常见问题
Is the Caesar cipher secure?
No. The Caesar cipher is very simple with only 25 possible keys, making it trivial to brute-force. It's mainly used for educational purposes and fun, not for protecting sensitive information.
Can the Caesar cipher encrypt Chinese characters?
The Caesar cipher only shifts English letters (A-Z, a-z). Chinese characters, numbers, and punctuation are left unchanged.
What is the relationship between ROT13 and the Caesar cipher?
ROT13 is a special case of the Caesar cipher with a fixed shift of 13. Since there are 26 letters in the English alphabet, applying ROT13 twice returns the original text.
How can you break the Caesar cipher?
The simplest method is brute force — try all 25 possible shifts. You can also use frequency analysis, leveraging the fact that certain letters (like E) appear more frequently in English.
Share this tool