usefmtly

What Is ROT13?

ROT13 shifts every letter in the alphabet 13 positions forward. A becomes N, B becomes O, and so on. It is not encryption — but it has a useful property: applying it twice gives you back the original text.

The idea in one sentence

ROT13 replaces every letter with the one 13 positions later in the alphabet. A→N, B→O, C→P, and so on. When you reach Z, it wraps back to the start — so N→A, O→B, P→C.

Example

Input

Hello, World!

ROT13 output

Uryyb, Jbeyq!

ROT13 again

Hello, World!

Numbers, spaces, and punctuation are never changed — only letters.

Why applying it twice restores the original

The alphabet has 26 letters. ROT13 shifts by 13 — exactly half. Shift by 13 twice and you've shifted by 26, which lands you back where you started.

This makes ROT13 its own inverse: the same operation encodes and decodes. There's no "decode mode" — just run ROT13 again.

The math

A (position 1) + 13 = N (position 14)

N (position 14) + 13 = 27 → mod 26 = 1 = A

ROT13(ROT13(x)) = x

The full substitution table

Every letter and its ROT13 pair. The relationship is symmetric — the same table works in both directions.

PlainROT13PlainROT13
ANNA
BOOB
CPPC
DQQD
ERRE
FSSF
GTTG
HUUH
IVVI
JWWJ
KXXK
LYYL
MZZM

More examples

Hello

Uryyb

Why did the chicken cross the road?

Jul qvq gur puvpxra pebff gur ebnq?

Spoiler: he was dead the whole time

Fcbvyre: ur jnf qrnq gur jubyr gvzr

Secret message

Frperg zrffntr

Where ROT13 is used today

Hiding spoilers online

The original use case on Usenet in the 1980s — still used on Reddit, forums, and some blogs. Rot the spoiler text so readers have to actively decode it. No intent to deceive, just voluntary obscuration.

Obfuscating email addresses

Some sites display contact addresses in ROT13 to slow down spam scrapers. The user decodes it mentally or with a tool. Not foolproof against modern scrapers, but adds friction.

Puzzle games and ARGs

Alternate Reality Games and puzzle hunts frequently use ROT13 as a layer in multi-step ciphers. It's recognizable enough to be satisfying to solve, common enough that players know to check for it.

Developer jokes and Easter eggs

"Uryyb Jbeyq" in source code comments is a classic gag. Some Unix/Linux systems historically used ROT13 in fortune cookie programs and man page easter eggs.

ROT13 vs Caesar cipher vs encryption

ROT13

Shift13 (fixed)Decode methodSame operation — no key neededSecurityNone — trivially decoded

Caesar cipher

Shift1–25 (variable)Decode methodShift in opposite direction by same amountSecurityNone — 25 possible keys, brute-forceable in seconds

Modern encryption (AES, RSA)

ShiftKey-based (128–4096 bits)Decode methodRequires the correct keySecurityComputationally secure

ROT13 provides no security against anyone who knows what it is. Use it to obscure, not to protect.

Free tools for this