Caesar Cipher & ROT13 Encoder/Decoder
Encode or decode text using the Caesar cipher with any shift (1–25) or ROT13. Shows letter-by-letter substitution and frequency analysis.
Did this tool work for you?
How to use this calculator
- 1
Select "Encode" to encrypt a message or "Decode" to decrypt one.
- 2
Set the shift amount (1–25). Both sender and receiver must use the same shift.
- 3
Use "ROT13" for quick reversible obfuscation (commonly used on forums for spoilers).
- 4
Use "Brute Force" if you have an encoded message and don't know the shift — scan 25 possibilities.
- 5
Non-letter characters (spaces, numbers) are passed through unchanged.
Frequently asked questions
Which characters get shifted?
Only the 26 unaccented Latin letters, A to Z and a to z, and case is kept: with shift 3, “Zulu” becomes “Cxox”. Digits, spaces, punctuation, accented letters such as é, and non-Latin scripts pass through unchanged. That makes the cipher easy to read for English text but means numbers in a message stay in the clear.
What shift values does the Shift box accept?
Whole numbers. The value wraps around the 26-letter alphabet, so 29 acts like 3 and 26 acts like 0, which leaves the text unchanged. A negative number shifts backwards: −3 is the same as 23, so “Zebra” encodes to “Wbyox”. Clearing the box counts as a shift of 0, which leaves the text unchanged. The Shift box is ignored in ROT13 and brute-force modes.
How does decode work?
Decoding with shift n applies a shift of 26 − n, which moves each letter n places back. Text encoded with shift 3 therefore decodes with shift 3: “Dwwdfn dw gdzq, Cxox 42!” returns “Attack at dawn, Zulu 42!”. If you do not know the shift, use brute-force mode and look for the readable line.
What is ROT13 and why is it special?
ROT13 is the Caesar cipher with shift 13. Because 13 is half of 26, running it twice returns the original text, so there is no separate decode step. “Hello, World” becomes “Uryyb, Jbeyq”, and putting that back through ROT13 returns the starting text.
What does brute-force mode show?
Shifts 1 to 25 applied to your input, one line each. It does not rank them or pick a winner, so you must find the readable line yourself. For “Khoor” the line at shift 23 reads “Hello”. Shift 0 is omitted because it is the original text. Note that brute force applies shift n forward, so shift 23 forwards is the same as decoding shift 3.
Does the tool do frequency analysis?
No. It lists all 25 candidate shifts but does not count letters or score the results. The mapping table shown for short messages lists the first 20 or fewer letters and their substitutes, which is not a frequency count. For longer ciphertext you will need to compare the 25 lines by eye.
Is the Caesar cipher secure?
No. There are only 25 useful shifts, and every occurrence of a letter is replaced by the same letter, so the cipher can be broken within seconds by hand or by the brute-force mode here. Use it for puzzles, teaching and light obfuscation only, never for secrets.
Caesar shifts, ROT13 and brute force in practice
How a shift is applied
Each letter is moved a fixed number of places along the alphabet, wrapping from Z back to A. The tool keeps upper and lower case separate and leaves everything that is not a letter alone. Decoding is the same operation with the opposite shift. Because there are 26 letters, shifts differ only by their remainder after dividing by 26, which is why 26 changes nothing and negative numbers work.
| Mode | Shift | Input | Output |
|---|---|---|---|
| Encode | 3 | Attack at dawn, Zulu 42! | Dwwdfn dw gdzq, Cxox 42! |
| Decode | 3 | Dwwdfn dw gdzq, Cxox 42! | Attack at dawn, Zulu 42! |
| ROT13 | n/a | Hello, World | Uryyb, Jbeyq |
| Encode | −3 | Zebra | Wbyox |
| Encode | 26 | Zebra | Zebra |
Worked example: encode and decode
Encoding “Attack at dawn, Zulu 42!” with shift 3 gave “Dwwdfn dw gdzq, Cxox 42!”. A moves to D, the final Z wraps to C, and the comma, spaces, the digits 4 and 2, and the exclamation mark all stay. Running decode with the same shift returned the original sentence exactly, and the output text in encode mode adds a reminder to reverse it using Decode with shift 3.
Worked example: finding an unknown shift
Given the ciphertext “Khoor” and no shift, brute-force mode printed 25 lines from “Lipps” at shift 1 to “Jgnnq” at shift 25. Only one is a word: shift 23 gives “Hello”. Since that is a forward shift of 23, the sender used 3 and the receiver should decode with 3. With longer messages, scan for the line that contains real words rather than looking only at the first one.
Limits worth knowing
The tool cannot handle messages in languages with other alphabets or with accented letters, because those characters are copied through unchanged. It also reveals word lengths and punctuation, which helps anyone attempting to read it. If you rely on a particular shift convention, such as shifting backwards to encrypt, set a negative value or use Decode deliberately so the direction matches the other person.
Teaching and puzzle uses
The tool suits classroom exercises: encode a sentence, hand the ciphertext to a partner, and let them use brute-force mode or work out the shift by comparing short words. Because spaces and punctuation are preserved, one-letter words such as A or I and the shapes of short words give strong clues, which is a good way to see why this cipher is so weak.
Learn more from an authoritative source:
WikipediaBraille Translator
Translate English text to Grade 1 Braille Unicode characters. Shows the Braille cell dot patterns for each letter.
Grade Average Calculator
Calculate your weighted or simple average grade from multiple subjects or assignments.
GPA to Percentage Converter
Convert GPA to percentage or percentage to GPA using 4.0, 5.0, or 10.0 scale.
Study Hours Planner
Calculate how many hours you need to study based on pages, reading speed, and difficulty.
Exam Score Calculator
Convert raw exam scores to percentage, letter grade, and GPA. Check if you passed.
Reading Speed Calculator
Calculate your reading speed in WPM and estimate how long it takes to read any book.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →