Embed this tool on your site
About this tool
The Caesar Cipher & ROT13 tool encodes and decodes text using the classical Caesar substitution cipher, which shifts each letter in the alphabet by a fixed number of positions. ROT13 is the special case where the shift is 13 — halfway through the 26-letter alphabet — which makes encoding and decoding the same operation. The tool supports any shift value from 1 to 25, preserves case, and passes through non-alphabetic characters (digits, punctuation, spaces) unchanged. ROT13 is commonly used to hide spoilers online; the Caesar cipher is a foundational cryptography teaching tool and a historical cipher dating to ancient Rome.
Why use it
Supports any shift value 1-25, not just ROT13 — useful for puzzles, CTFs, and historical re-creation.
ROT13 option in the Cipher dropdown; encoding and decoding are the same operation.
Preserves case, numbers, and punctuation in the output.
Instant encoding and decoding as you type, plus a substitution-alphabet table for the current shift.
How to use
- Enter the text you want to encode or decode in the Input text area.
- Choose Caesar cipher or ROT13 from the Cipher dropdown.
- For Caesar, drag the Shift slider (1-25, default 3); the substitution alphabet table below shows each letter's mapping.
- Choose Encode or Decode from the Mode dropdown; for ROT13 both give the same result.
- The output updates instantly; click Copy output, or Swap input/output to feed the result back in.
When it helps
- Hiding spoilers with ROT13 before posting online.
- Teaching classical cryptography and substitution ciphers.
- Encoding simple messages as a puzzle or game.
- Demonstrating why the Caesar cipher is trivially breakable with brute force.
- Hiding spoilers in forum posts, reviews, or chat messages — ROT13 is the internet convention.
- Teaching classical cryptography in a computer science or history class — students grasp it in minutes.
Examples
01Caesar shift 3 (Julius Caesar's cipher)
InputPlaintext: HELLO WORLD
Shift: 3
Mode: Encode
Expected resultCiphertext: KHOOR ZRUOG
02ROT13 (shift 13, self-inverse)
InputPlaintext: Spoiler: the butler did it
Shift: 13
Expected resultCiphertext: Fcbvyre: gur ohgyre qvq vg
(Apply ROT13 again to decode back to plaintext.)
03Decoding without knowing the shift
InputCiphertext: WKLV LV D WHVW
Mode: Decode, moving the Shift slider
Expected resultShift 1: VJKU KU C VGUV (gibberish)
Shift 3: THIS IS A TEST (readable — answer found!)
04Mixed case and punctuation preserved
InputPlaintext: Hello, World! 2026
Shift: 5
Mode: Encode
Expected resultCiphertext: Mjqqt, Btwqi! 2026
(Punctuation, space, and digits unchanged.)
Tips
- Use ROT13 for spoilers — most readers know how to decode it and won't reveal it accidentally.
- If you receive Caesar-encoded text but don't know the shift, set Mode to Decode and step the slider through 1-25 until the output is readable.
- Shifts wrap around the alphabet — Z + 3 = C. The tool handles this automatically.
- Case is preserved: 'Hello' becomes 'Khoor' with shift 3, not 'KHOOR' or 'khoor'.
- For multi-step puzzles, encode with one shift then re-encode with another — the result is just a different single shift.
- Frequency analysis breaks Caesar cipher in any language; the most common letter in English ciphertext usually maps to E.
- Never use Caesar or ROT13 to protect anything you care about keeping private — both are decorative, not secure.
Frequently Asked Questions
What is a Caesar cipher?⌄
A Caesar cipher shifts each letter in the plaintext by a fixed number of positions in the alphabet. For example, with shift 3: A→D, B→E, C→F.
What is ROT13?⌄
ROT13 is a Caesar cipher with shift 13. Because the English alphabet has 26 letters, applying ROT13 twice returns the original text (ROT13(ROT13(x)) = x).
Is the Caesar cipher secure?⌄
No. The Caesar cipher has only 25 possible keys, making it trivially crackable by brute force or frequency analysis. It is a teaching tool, not a real security mechanism.
What happens to numbers and punctuation?⌄
Non-alphabetic characters are passed through unchanged. Only A-Z and a-z are shifted.
How do I decode a Caesar cipher if I don't know the shift?⌄
With only 25 possible shifts, set Mode to Decode and move the Shift slider until the output reads as normal text. The correct shift produces readable English.
Glossary
- Caesar cipher
- A substitution cipher invented by Julius Caesar in ~50 BCE that shifts each letter of the plaintext by a fixed number of positions in the alphabet; the simplest form of monoalphabetic substitution.
- ROT13
- A Caesar cipher with shift 13. Because 13 is half of 26 (the English alphabet length), encoding and decoding are the same operation; widely used online to hide spoilers.
- Substitution cipher
- Any cipher that replaces each plaintext letter with a different letter according to a fixed scheme; Caesar is the simplest substitution cipher.
- Monoalphabetic
- A substitution cipher where each letter has a single, fixed substitute — Caesar is monoalphabetic. Contrast with polyalphabetic ciphers like Vigenère, which use multiple substitutes.
- Frequency analysis
- A cryptanalysis technique that breaks substitution ciphers by counting letter frequencies in ciphertext and matching them to expected frequencies in the plaintext language (E is most common in English, ~12.7%).
- Brute force
- Trying every possible key until one produces readable output; for Caesar there are only 25 possible keys, so brute force succeeds in seconds even by hand.
- Plaintext / ciphertext
- Plaintext is the original readable message; ciphertext is the encoded output. Encryption transforms plaintext into ciphertext; decryption reverses the process.
- Educational cipher
- A cipher used for teaching cryptographic concepts rather than real security. Caesar and ROT13 are educational ciphers — useful for learning, dangerous for real protection.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.
Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.
✳
✳
✓ Free to use✓ No sign-up✓ 500+ possibilities