UtilityKit

500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.

Caesar Cipher & ROT13

Encode and decode text using Caesar cipher with any shift value (1-25) or the ROT13 variant with a single click.

About Caesar Cipher & ROT13

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 Caesar Cipher & ROT13

  • Supports any shift value 1-25, not just ROT13.
  • One-click ROT13 with encode/decode toggle.
  • Preserves case, numbers, and punctuation in the output.
  • Instant encoding and decoding — no submit button.
  • Supports any shift value 1-25, not just ROT13 — useful for puzzles, CTFs, and historical re-creation.
  • One-click ROT13 preset with automatic encode/decode toggle since the operation is self-inverse.

How to use Caesar Cipher & ROT13

  1. Enter the text you want to encode or decode.
  2. Select a shift value (1-25) or click ROT13 for a shift of 13.
  3. The encoded/decoded output updates instantly.
  4. Click Decode to reverse the operation with the same shift.
  5. Enter the text you want to encode or decode in the input area (any length, any characters).
  6. Set the shift value using the slider (1-25) or click the ROT13 preset for a shift of exactly 13.
  7. Choose Encode (shift forward) or Decode (shift backward) — for ROT13 they are the same operation.

When to use Caesar Cipher & ROT13

  • 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

Caesar shift 3 (Julius Caesar's cipher)

Input: Plaintext: HELLO WORLD Shift: 3 Mode: Encode

Output: Ciphertext: KHOOR ZRUOG

ROT13 (shift 13, self-inverse)

Input: Plaintext: Spoiler: the butler did it Shift: 13

Output: Ciphertext: Fcbvyre: gur ohgyre qvq vg (Apply ROT13 again to decode back to plaintext.)

Decoding without knowing the shift

Input: Ciphertext: WKLV LV D WHVW Mode: Try All Shifts

Output: Shift 1: VKJU JV C VGUV (gibberish) Shift 3: THIS IS A TEST (readable — answer found!) Shift 5: RFGQ GQ Y RCQR (gibberish)

Mixed case and punctuation preserved

Input: Plaintext: Hello, World! 2026 Shift: 5 Mode: Encode

Output: Ciphertext: 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, click Try All Shifts and look for the readable result.
  • 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, you can try all of them (brute force) in seconds. The correct shift will produce readable English text.

Explore the category

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.