DevKit
Crypto

Caesar Cipher / ROT13

Encode and decode text with a Caesar shift cipher, including ROT13.

Last updated: August 2026

Shift 13

—

ROT13 (shift 13, self-inverse)

—

To decode, apply the opposite shift (26 − n). ROT13 decodes itself.

Share:

Was this tool helpful?

Shifting letters around the alphabet

A Caesar cipher replaces each letter with one a fixed number of positions further along the alphabet, wrapping past Z back to A. A shift of 3 turns A into D. ROT13 is simply a Caesar cipher with a shift of 13, which is its own inverse: applying ROT13 twice returns the original text.

What it is good for (and not)

This is a toy by modern standards. With only 25 possible shifts, anyone can break it by trying them all in seconds, and even that is unnecessary because letter-frequency analysis cracks it instantly. ROT13 is not secrecy at all; it is a convention for lightly obscuring spoilers, puzzle answers, or offensive words so a reader has to opt in to see them.

Example

shift = 3
HELLO -> KHOOR

ROT13 (shift 13)
Why did the chicken? -> Jul qvq gur puvpxra?
apply again         -> Why did the chicken?

Non-letter characters like spaces, digits, and punctuation are normally passed through unchanged, which is why word boundaries stay visible and make the cipher trivial to read.

Common gotchas

Case is usually preserved, so uppercase maps to uppercase and lowercase to lowercase separately. A shift of 26 (or 0) does nothing, and a negative shift just decodes. If accented or non-Latin characters appear, most implementations leave them alone rather than guessing an alphabet.

FAQ

Is ROT13 ever acceptable for hiding data? Only for casual obfuscation where you are not trying to stop anyone determined. For real protection use AES encryption.

How do I decode if I do not know the shift? Try all 25, or look at the most frequent letter and assume it maps to E. The right shift usually jumps out as readable English.