ROT13
Encode and decode ROT13, ROT5, ROT18, and ROT47. Self-inverse, live, offline.
Encode and decode ROT13, ROT5, ROT18, and ROT47. The classic letter-rotation ciphers, computed entirely in your browser. Read more Show less
What is ROT13?
ROT13 ("rotate by 13 places") is a simple substitution cipher that replaces each letter with the letter 13 positions after it in the alphabet. A becomes N, B becomes O, and so on. Because the English alphabet has 26 letters, applying ROT13 twice returns the original text - so the same operation both encodes and decodes.
ROT13 is not encryption. It has no key, no configuration, and no security value. It is used on the internet to hide spoilers, punchlines, puzzle answers, and offensive content from casual reading, and it appears throughout Usenet culture, online forums, and puzzle communities.
How to use
Type or paste into the input. The output updates live. Because ROT13 is its own inverse, there is no separate encode and decode mode - the same operation does both.
Choose a variant in the settings panel:
- ROT13 - letters A-Z only. The original and most common form.
- ROT5 - digits 0-9 only. Rotates each digit by 5.
- ROT18 - ROT13 combined with ROT5. Letters and digits both rotated.
- ROT47 - rotates all printable ASCII characters (codes 33-126) by 47 positions. Handles punctuation and symbols as well as letters and digits.
The four ROT variants
All ROT ciphers are self-inverse: applying the same variant twice returns the original text. That is the property that makes them useful for casual obfuscation - the reader does not need to know a key.
ROT13 splits the 26-letter alphabet in half: A-M becomes N-Z, and N-Z becomes A-M. It leaves digits, punctuation, and whitespace untouched.
ROT5 does the same for the ten digits: 0-4 becomes 5-9, and 5-9 becomes 0-4. It leaves everything else untouched.
ROT18 is ROT13 and ROT5 applied together, so letters and digits both rotate.
ROT47 works on the 94 printable ASCII characters (codes 33 through 126). It is more thorough than the others because it also affects punctuation and symbols - but it is still trivially reversible and offers no security.
Why does this exist?
ROT13 appeared in the early 1980s on Usenet, where it was used to hide joke punchlines, movie spoilers, and puzzle solutions from readers who did not want to see them yet. The convention stuck. It still appears in online forums, IRC channels, and puzzle communities.
It is also a common first exercise when learning about ciphers, because the code is short enough to hold in your head and the property of self-inversion is easy to demonstrate.
Why ROT13 is not encryption
ROT13 has no key. Anyone who knows it is ROT13 can decode the output instantly. It does not protect confidentiality, integrity, or authenticity. Do not use it for passwords, secrets, personal data, or anything that matters.
If you need actual encryption, use AES-GCM or ChaCha20-Poly1305, both of which are available as tools on this site.
FAQ
Is ROT13 still used?
Yes, mostly for casual obfuscation. Common uses: hiding spoilers on forums, obscuring punchlines, embedding answers to puzzles so they are visible only to people who want them, and bypassing naive content filters (which does not work against any real filter, but the pattern persists).
What is the difference between ROT13 and Caesar cipher?
ROT13 is a special case of the Caesar cipher with a fixed shift of 13. A general Caesar cipher allows any shift from 1 to 25. ROT13 happens to be self-inverse, which is convenient, but that property does not hold for other shifts.
Can I decode ROT13 without knowing it is ROT13?
Usually, yes. Any text encoded with ROT13 has a distinctive statistical signature, and both tools and humans recognize it quickly. This is the main reason ROT13 offers no security.
Does ROT13 work on non-English text?
No. ROT13 is defined for the 26 letters of the Latin alphabet. Accented characters, Greek, Cyrillic, Chinese, Japanese, and any other script pass through unchanged. ROT47 works on all printable ASCII, but still leaves non-ASCII characters alone.
What about ROT1, ROT2, or ROT25?
Those exist as the general Caesar cipher. This tool focuses on the four standard ROT variants (13, 5, 18, 47) because those are the ones with established conventions. A general Caesar cipher tool with an arbitrary shift is a separate tool.
Command line equivalent
# Python
python3 -c 'import codecs; print(codecs.encode("hello", "rot13"))'
python3 -c 'import codecs; print(codecs.decode("uryyb", "rot13"))'
# tr (classic Unix)
echo "hello world" | tr 'A-Za-z' 'N-ZA-Mn-za-m'
# ROT47 in Python
python3 -c 'print("".join(chr(33 + ((ord(c) - 33 + 47) % 94)) if 33 <= ord(c) <= 126 else c for c in "Hello, World!"))'