ROT13 / ROT47 Cipher

Encode or decode text using ROT13, ROT5, ROT47, or any custom rotation value. Self-inverse and live.

Input
Output (apply again to decode)

Alphabet mapping (original → rotated):

Type text above to apply ROT13.

How to Use the ROT13 Cipher Tool

  1. Choose a cipher mode — ROT13 (letters only), ROT5 (digits only), ROT47 (all printable ASCII), or Custom ROTn with your own rotation value.
  2. Type or paste your text — the encoded output appears in real time on the right.
  3. 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.
  4. 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.

Frequently Asked Questions

ROT13 is a simple letter substitution cipher that replaces each letter with the letter 13 positions after it in the alphabet. Because the alphabet has 26 letters, applying ROT13 twice returns the original text — making it its own inverse. ROT13 is used to hide spoilers and puzzle solutions in online forums. It provides no real security.
ROT13 rotates only letters (A-Z) by 13 positions. ROT5 rotates only digits (0-9) by 5 positions. ROT47 rotates all printable ASCII characters (codes 33 to 126) by 47 positions, including symbols. A combined ROT13+ROT5 is sometimes called ROT18.
No. ROT13 provides no cryptographic security. Any attacker can decode it in seconds. ROT13 is designed for light obfuscation — hiding spoilers or preventing casual readers from seeing answers. For actual security, use AES encryption, bcrypt for passwords, or TLS for network communication.
No. This ROT13 cipher tool runs entirely in your browser using JavaScript. Your text is never sent to any server, there is no logging, and no data collection of any kind.
A custom ROTn cipher lets you choose any rotation value from 1 to 25. For example, ROT3 is the classical Caesar cipher. Only ROT13 is self-inverse; for other values you need to apply the inverse rotation (26 minus the rotation amount) to decode.