What Is ROT13 And How Does It Work

Learn how the ROT13 cipher rotates letters, why it is its own inverse, where it is still used, and why it is not encryption.

4 min read Updated Jul 2026

Quick Answer

The ROT13 cipher rotates every Latin letter 13 places along the alphabet, so A becomes N and Hello becomes Uryyb. Because 13 is half of 26, applying it twice restores the original, therefore the same pass both encodes and decodes: a ROT13 decoder and a ROT13 encoder are the same tool. Paste ROT13 text to read it, or paste plain text to hide it.

Try the ROT13 Tool →

How It Works

Picture the 26 letters on a wheel. ROT13 turns the wheel exactly half a revolution: A lands on N, B on O, and once you pass Z you wrap around to A again. Uppercase stays uppercase, lowercase stays lowercase, and every character that is not a Latin letter, digits, punctuation, spaces, emoji, accented and non-Latin scripts, passes through untouched. For example, Attack at dawn 07:00! becomes Nggnpx ng qnja 07:00!: numbers are not rotated by ROT13, and punctuation never moves either.

The half-turn is the whole trick. A rotation of 13 followed by another rotation of 13 is a full 26-place revolution, which is the identity. That self-inverse property is why the tool has no meaningful difference between its encode and decode directions.

ROT13 vs Caesar Cipher and Base64

ROT13 is the Caesar cipher with a shift of 13. Caesar's original reportedly shifted by 3, and any shift from 1 to 25 works; however, 13 is the only shift that is its own inverse in a 26-letter alphabet, which made it the internet convention. Compared with Base64, the purpose differs: Base64 is a transport encoding that converts every byte for machines, while ROT13 scrambles only letters for human eyes. If you need symbols and digits obscured too, the ROT47 variant rotates a wider ASCII range.

What ROT13 Is Used For

ROT13 hides text from an accidental read while keeping it one click from recovery. Usenet newsgroups adopted it in the 1980s for spoilers and puzzle answers, and the habit survives: forum spoilers, geocaching hints, quiz solutions, and joke punchlines still travel as ROT13. Developers also meet it in coding exercises, since the whole cipher is a one-line transformation over character codes.

Why ROT13 Is Not Encryption

Encryption depends on a secret key; ROT13 has none. The transformation is fixed and universally known, so decoding requires no knowledge beyond recognizing the cipher. Treat it as a curtain, not a lock: perfect for spoilers, useless for secrets. Anything that genuinely needs protecting belongs in real cryptography, not a letter rotation.

Common Mistakes

You May Also Need

You may also need

Next steps

Alternatives

Continue Learning