ROT13 / 凯撒密码
使用 ROT13 或任意位移量(1–25)的凯撒密码加解密文本,支持一键查看全部 25 种位移结果。
What Is the Caesar Cipher?
The Caesar cipher is a substitution cipher in which each letter of the plaintext is shifted a fixed number of positions down the alphabet. Named after Julius Caesar, who reportedly used a shift of 3 to protect military communications, it is the simplest example of a rotational cipher. Despite its age, the Caesar cipher remains important in cryptography education, and its variant ROT13 (shift of 13) is widely used online to hide spoilers or puzzle answers.
This tool supports all 25 possible shifts and includes a brute-force preview table that shows every decryption at once — useful when the shift value is unknown.
How to Use the Caesar Cipher Tool
- Use the shift slider to choose a rotation value from 1 to 25. Click the ROT13 button to jump directly to shift 13.
- Type or paste your text into the input area. The encoded output updates in real time.
- To decode, paste the ciphertext, then adjust the slider until the output is readable — or expand All 25 Shifts to see all options at once.
- Click any row in the shifts table to select that shift value.
- Use Swap to move the output back to the input field.
Features
- Caesar cipher with adjustable shift from 1 to 25
- One-click ROT13 preset (shift 13)
- Preserves case — uppercase and lowercase letters shifted independently
- Non-alphabetic characters (digits, punctuation, spaces) passed through unchanged
- All 25 shifts preview table for instant brute-force decryption
- Click any table row to select that shift
- Runs entirely in your browser — no data uploaded
FAQ
What is the Caesar cipher?
The Caesar cipher is one of the oldest encryption techniques. It substitutes each letter by shifting it a fixed number of positions down the alphabet. With shift 3, A becomes D, B becomes E, and so on. Julius Caesar reportedly used a shift of 3 in military correspondence.
What is ROT13?
ROT13 is a Caesar cipher with a shift of 13. Because the alphabet has 26 letters, applying ROT13 twice returns the original text — encoding and decoding use the same operation. ROT13 is commonly used on forums to hide spoilers or puzzle answers.
How do I decode a Caesar cipher without knowing the shift?
Expand the All 25 Shifts table below the output. It shows every possible decryption at once — the correct shift is the one that produces readable text. Click any row to select that shift.
Does the Caesar cipher affect numbers and punctuation?
No. This implementation only shifts alphabetic characters (A–Z, a–z). Digits, spaces, and punctuation are passed through unchanged.