Caesar Cipher Calculator
Encode and decode text with a Caesar shift cipher — including the classic ROT13 — by shifting every letter through the alphabet.
Loading calculator…
What this tool does
Encode and decode text with a Caesar shift cipher — including the classic ROT13 — by shifting every letter through the alphabet. Only A–Z letters are shifted; case is preserved and digits, spaces and punctuation pass through unchanged. A Caesar cipher has only 25 useful keys and falls to frequency analysis in seconds — it is a teaching and puzzle tool, never real security.
How to use the Caesar Cipher Calculator
- Enter or select text.
- Enter or select shift (letters).
- Enter or select operation.
- Read the calculated result; change any measurement to compare alternatives.
Formula
Each letter is replaced by the letter k positions later in the alphabet, wrapping Z → A: cipher = (letter + k) mod 26. Decoding shifts by −k. ROT13 is the special case k = 13, which is its own inverse.
- text
- Text
- shift
- Shift (letters)
- mode
- Operation
Only A–Z letters are shifted; case is preserved and digits, spaces and punctuation pass through unchanged. A Caesar cipher has only 25 useful keys and falls to frequency analysis in seconds — it is a teaching and puzzle tool, never real security.
Worked example
For caesar cipher calculator, the following measurements illustrate the exact method: Text: HELLO; Shift (letters): 3; Operation: encode.
Inputs
- TextHELLO
- Shift (letters)3
- OperationEncode (shift forward)
Result
- ResultKHOOR
- Shift used3
- OperationEncode
Results explained
- Result
- Result from the formula above. Only A–Z letters are shifted; case is preserved and digits, spaces and punctuation pass through unchanged. A Caesar cipher has only 25 useful keys and falls to frequency analysis in seconds — it is a teaching and puzzle tool, never real security.
- Shift used
- Shift used from the formula above. Only A–Z letters are shifted; case is preserved and digits, spaces and punctuation pass through unchanged. A Caesar cipher has only 25 useful keys and falls to frequency analysis in seconds — it is a teaching and puzzle tool, never real security.
- Operation
- Operation from the formula above. Only A–Z letters are shifted; case is preserved and digits, spaces and punctuation pass through unchanged. A Caesar cipher has only 25 useful keys and falls to frequency analysis in seconds — it is a teaching and puzzle tool, never real security.
Frequently asked questions
A substitution cipher named after Julius Caesar, who reportedly used a shift of 3: every letter is replaced by the letter a fixed number of positions later in the alphabet, so with shift 3, A becomes D and HELLO becomes KHOOR.
ROT13 is a Caesar cipher with a shift of exactly 13. Because 13 is half the alphabet, applying ROT13 twice returns the original text, so the same operation encodes and decodes — long used online to hide spoilers and puzzle answers.
Try decoding with each shift from 1 to 25 and look for the one that produces readable words — there are only 25 possibilities. Statistical tools also work: in English, E is the most common letter, so the most common cipher letter usually maps to E.
No. Only letters A–Z and a–z are shifted, letter case is preserved, and every other character — digits, spaces, punctuation — passes through exactly as typed.
Not at all. With only 25 keys it can be broken by hand in minutes. It is included for education, puzzles and CTF challenges; use real encryption (your operating system and messaging apps provide it) for anything private.
Yes. The cipher runs entirely in your browser and your text is never uploaded or stored — though remember the cipher itself offers no secrecy once the output is shared.