ROT13 Cipher

ROT13 (rotate by 13 places) is a special case of the Caesar cipher with a shift of 13. It is its own inverse (applying ROT13 twice returns the original text), making it convenient for simple obfuscation. It is commonly used in online forums to hide spoilers and puzzle solutions.

10Worksheets
200+Practice Questions
BeginnerDifficulty
1 hourHours to Master

Introduction to ROT13 Cipher

ROT13 (rotate by 13 places) is a special case of the Caesar cipher with a shift of 13. It is its own inverse (applying ROT13 twice returns the original text), making it convenient for simple obfuscation. It is commonly used in online forums to hide spoilers and puzzle solutions.

Prerequisites

Caesar cipher concept Alphabet positions Understanding that ROT13 is self-inverse
Why This Matters: ROT13 Cipher problems appear in 1-2 questions in SSC CGL and Banking PO exams. They test understanding of the 13-shift property.

How to Solve ROT13 Cipher Problems

1

Step 1: Identify each letter in the given word

2

Step 2: Convert the letter to its position number (A=1, B=2, ..., Z=26)

3

Step 3: Add 13 to the position number

4

Step 4: If the result exceeds 26, subtract 26 to wrap around

5

Step 5: Convert the resulting position back to a letter

6

Step 6: Since ROT13 is self-inverse, the same process decodes

Pro Strategy: ROT13 shifts each letter by 13 positions. Because 13 is half of 26, ROT13 is an involution (self-inverse). This means the same process both encodes and decodes.

Example Problem

Example: Decode 'URYYB' using ROT13. Solution: Step 1: U=21, R=18, Y=25, Y=25, B=2 Step 2: Add 13: 21+13=34→34-26=8→H, 18+13=31→31-26=5→E, 25+13=38→38-26=12→L, 25+13=38→L, 2+13=15→O Step 3: Decoded word: HELLO Answer: HELLO

Pro Tips & Tricks

  • ROT13 is its own inverse: applying it twice gives the original
  • A↔N, B↔O, C↔P, D↔Q, E↔R, F↔S, G↔T, H↔U, I↔V, J↔W, K↔X, L↔Y, M↔Z
  • Common word: 'HELLO' ↔ 'URYYB', 'WORLD' ↔ 'JBEYQ'
  • Vowels map to: A↔N, E↔R, I↔V, O↔B, U↔H (none remain vowels)
  • ROT13 is often used for simple text obfuscation on the internet
  • To decode quickly, remember that letters in the first half (A-M) map to the second half (N-Z)

Shortcut Methods to Solve Faster

If letter is between A and M (positions 1-13), add 13
If letter is between N and Z (positions 14-26), subtract 13
ROT13(letter) = chr(((ord(letter) - ord('A') + 13) % 26) + ord('A'))
The same formula works for both encoding and decoding

Common Mistakes to Avoid

Using shift of 13 but forgetting to wrap around
Applying different shifts for encoding vs decoding (they are the same)
Confusing ROT13 with Atbash cipher
Forgetting that ROT13 is a specific case of Caesar cipher with shift 13

Exam Importance

ROT13 Cipher is an important topic for various competitive exams. Here's how frequently it appears:

SSC CGL
1-2 questions
BANKING PO
1-2 questions
RAILWAYS RRB
1-2 questions
CAT
0-1 questions
INSURANCE
1-2 questions

Ready to Master ROT13 Cipher?

Start with Worksheet 1 and work your way up to expert level! Each worksheet includes:

20 practice questions
Detailed solutions
Step-by-step explanations
Start Practicing Now