ROT13 / ROT47 Cipher
Encode or decode text using ROT13, ROT5, ROT47, or any custom rotation value. Self-inverse and live.
Alphabet mapping (original → rotated):
How to Use the ROT13 Cipher Tool
- Choose a cipher mode — ROT13 (letters only), ROT5 (digits only), ROT47 (all printable ASCII), or Custom ROTn with your own rotation value.
- Type or paste your text — the encoded output appears in real time on the right.
- Decode by applying again — ROT13 and ROT47 are self-inverse: paste the output back into the input and you get the original. For ROT5 and custom values, apply the inverse rotation.
- Copy or download — save the result using the buttons above the output.
What Is ROT13?
ROT13 is a simple letter substitution cipher that rotates each letter of the alphabet by 13 positions. Because the English alphabet has 26 letters, applying ROT13 twice always returns the original text — it is its own inverse. This self-reversing property makes ROT13 unique among rotation ciphers (only ROT0 and ROT13 have this property in a 26-letter alphabet).
The cipher was popularized on Usenet newsgroups in the 1980s and 1990s as a way to hide spoilers, offensive jokes, and puzzle answers from casual readers while still making them accessible to anyone who wanted to read them. It spread to online forums, early web communities, and email. Today it remains a common example cipher in programming tutorials and computer science education.
ROT13 in Practice
ROT13 works exclusively on letters. The letters A-M map to N-Z and vice versa: A→N, B→O, C→P ... M→Z, N→A, O→B ... Z→M. Non-letter characters — spaces, digits, punctuation, and symbols — are passed through unchanged. This means "Hello, World!" becomes "Uryyb, Jbeyq!" — the comma and exclamation mark are untouched while all letters are rotated.
ROT5, ROT18, and ROT47
ROT5 applies the same rotation concept to digits (0-9). Digit 0 maps to 5, 1 maps to 6, and so on, with 5 mapping back to 0. Combining ROT13 and ROT5 gives ROT18, which rotates both letters and digits while leaving symbols alone. ROT47 takes a different approach: it rotates all printable ASCII characters from code 33 (exclamation mark) to code 126 (tilde) — a range of 94 characters — by 47 positions. This means ROT47 obfuscates symbols, brackets, and punctuation as well as letters and digits.
Custom Rotation: The Caesar Cipher Connection
The Custom ROTn mode lets you choose any rotation from 1 to 25. This is exactly the Caesar cipher — one of the oldest known encryption techniques, used by Julius Caesar to protect his military communications. Caesar reportedly used ROT3, shifting each letter three places. The security of any fixed-rotation cipher is minimal: there are only 25 possible shifts, making brute-force decoding trivial even by hand.
When Is ROT13 Actually Used Today?
ROT13 is still actively used in specific contexts: hiding movie or book spoilers in online reviews and forums, obfuscating email addresses to reduce scraper visibility in source code, masking quiz answers on educational websites, encoding clues in puzzle hunts and Alternate Reality Games (ARGs), and as a first example in cryptography courses. Some Unix and Linux systems include a rot13 command-line utility. The Python string library even has a built-in ROT13 codec.
Related Encoding and Cipher Tools
Explore more encoding tools: Caesar Cipher with Brute Force — try all 25 rotations at once with frequency analysis, Base64 Encoder/Decoder — binary-to-text encoding used in email and web, Hash Generator — one-way cryptographic hashing with SHA-256, and Morse Code Translator for a completely different encoding system.