Caesar Cipher
What is the Caesar cipher?
Result
How it is calculated
Each ASCII letter is moved forward in the alphabet by the shift value, wrapping from z back to a. For a letter with alphabet position p (0–25), the output position is (p + shift) mod 26. Upper and lower case are handled separately and keep their case. The shift is reduced modulo 26 first, so 29 behaves like 3 and a negative shift such as -3 moves letters backwards, which is how you decode. Digits, spaces, punctuation and any non-ASCII characters are copied through unchanged. If the shift field is empty, 3 is used. Empty text gives no result.
Worked example
Take the text Hello 2026 with a shift of 3. H becomes K, e becomes h, l becomes o, l becomes o and o becomes r. The space and the digits 2026 are not letters, so they stay as they are. The result is Khoor 2026. To get the original back, run the result again with a shift of -3 (or 23).
Common mistakes
- Expecting accented or non-English letters to shift: only A–Z and a–z are rotated, so letters like ç, ğ, ö or ü pass through untouched.
- Decoding with the same positive shift instead of its opposite: if text was encoded with +5, decode with -5 or 21.
- Entering a shift of 26 (or 0) and wondering why nothing changed: a full 26-letter turn returns every letter to itself.
- Treating the output as secure: with only 25 usable shifts, the cipher is trivial to break by trying them all.
- Forgetting that digits are not shifted, so numbers in the message stay readable.
About this calculator
This tool applies the Caesar cipher, one of the oldest known encryption methods (reportedly used by Julius Caesar for military messages), which shifts every letter in the text a fixed number of positions through the alphabet — a shift of 3 turns A into D, B into E, and so on, wrapping back to the start once it passes Z. Entering a negative shift reverses the process, decrypting text that was encrypted with the corresponding positive shift.
It's used today mainly for teaching the basic concepts of cryptography — substitution, key space and how easily a shift cipher can be broken by trying all 25 possible shifts or by frequency analysis — as well as for puzzles, escape rooms, and lightweight obfuscation where real security isn't the goal, since the cipher offers essentially none against a determined attacker.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
To decrypt, apply the opposite shift: a message encrypted with shift 3 comes back with shift -3, or equivalently 23. Shift 13 undoes itself, and any multiple of 26 returns the original text. Only the letters A to Z are rotated, so digits, punctuation and accented letters such as ç or ş stay untouched. If you leave the shift empty it falls back to 3. Got a message that will not decode? Post it with the shift you tried.