CAESAR CIPHER
Caesar cipher / ROT13, one click to flip.
Enter text and a shift to encrypt or decrypt. With an unknown key, brute-force all 26 shifts and pick the readable one.
Everything runs locally in your browser
What is this?
A Caesar cipher replaces each letter by a fixed shift; ROT13 is the shift-13 special case (encrypt and decrypt are identical). Only A–Z/a–z are shifted; Chinese and symbols are kept as-is.
FAQ
When is brute force useful?
When you have ciphertext but no shift, listing all 26 results lets you spot the readable one at a glance.
Is anything uploaded?
No. Everything runs in your browser; nothing is sent to a server.
示例与注意事项Example & notes
一个例子A worked example
明文 HELLO 位移 3 位得到 KHOOR;解密时反向位移 3 位即可还原。Plaintext HELLO shifted by 3 becomes KHOOR, and shifting back by 3 restores it.
注意事项Things to watch
- 位移 13(ROT13)是自逆的,加密两次就回到原文。A shift of 13 is self-inverse: applying it twice returns the original.
- 只对字母生效,数字、标点与中文不受影响。Only letters shift — digits, punctuation and Chinese stay unchanged.
- 位移只有 25 种可能,暴力破解毫无难度,仅作教学用途。With only 25 possible shifts it is trivially broken, so treat it as a teaching tool.
相关问答More Q&A
怎么破解凯撒密码?How do you break it?
最多试 25 次,或利用词频分析;字母 e 出现频率最高可作为突破口。Brute force the 25 shifts, or use frequency analysis — e is the most common letter.
支持中文吗?Does it support Chinese?
不支持;中文可先转拼音,或改用维吉尼亚密码。No — convert to pinyin first, or use the Vigenère cipher.