🔐 ROT13 Encoder Decoder
Encode and decode text using the ROT13 cipher, a simple letter substitution cipher that replaces each letter with the letter 13 positions after it in the alphabet. ROT13 is reversible (applying it twice returns the original text) and commonly used for simple obfuscation and rot13.com style puzzles.
- Each letter is replaced by the letter 13 positions ahead in the alphabet
- A becomes N, B becomes O, and so on
- Numbers and punctuation are preserved unchanged
- ROT13 is reversible - applying it twice returns the original text
- The same tool both encodes and decodes (symmetrical cipher)
📝 Examples:
- Simple text obfuscation for puzzles and games
- Hide spoilers in online discussions and forums
- Educational tool for learning about cipher techniques
- Rot13.com style text encoding games
- Quick text obfuscation (not for security purposes)
- Convert between ROT13 encoded and plain text
Why thirteen is the magic number
ROT13 is the Caesar cipher with a shift of 13, and 13 is exactly half of 26. That is what makes one pass serve for both directions - go forward 13 and forward 13 again and you have gone round the full alphabet:
out = (position + 13) mod 26 A=0 ... Z=25
H (7) -> 7 + 13 = 20 -> U U (20) -> 33 mod 26 = 7 -> H
No other shift behaves this way; ROT5 needs ROT21 to undo it. One character in, one character out, so the Input Length and Output Length counters always match; Letters Changed is how many A-Z characters your text held, and every one of them moves.
Its relatives, and the limits of the alphabet
- ROT5 does the same trick for digits (0 becomes 5), and ROT18 is ROT13 and ROT5 applied together.
- ROT47 rotates the 94 printable ASCII characters from
!to~, so punctuation and symbols scramble too. Use it when leaving digits legible would give the answer away. - Accented and non-Latin letters pass through untouched. An e-acute, a Greek sigma or a Cyrillic character is outside A-Z, so it survives intact and can leak the shape of the original word.
- Swap Areas pushes the output back into the input box, which is the quickest way to confirm a round trip returns your text exactly.
Frequently asked questions
Why do people use ROT13 for spoilers?
It came from Usenet in the early 1980s, where punchlines and film endings were posted rotated so nobody read them by accident. Newsreaders had a single key to unrotate, and the habit stuck in forums and puzzle communities.
What is the ROT13 of ROT13?
The text you started with. Two applications add up to a 26-place shift, a complete lap of the alphabet, which is why the same button encodes and decodes.
Can ROT13 protect a password or a private message?
No. Anyone can reverse it in seconds without knowing anything about you, and letter patterns stay visible. Use AES or an encrypted messenger for anything that genuinely needs to stay secret.