ROT13 / Caesar Cipher

Type or paste text and pick a shift — the result updates as you type. Use "Decode" to run the complementary shift instead of typing it by hand.

13 is the classic ROT13; any other number is a general Caesar shift.

How it works

Every ASCII letter in the input is shifted forward through the alphabet by the given amount, wrapping within its own case — az stays az, AZ stays AZ. Everything else — digits, punctuation, spaces, and non-Latin unicode characters — passes through completely unchanged. "Decode" re-runs the shift with 26 − shift (equivalently, the negative of the shift), which reverses it; running the exact same shift a second time only reverses it when the shift is 13.

Frequently asked questions

Why is ROT13 specifically self-inverse, but other shifts are not?

13 is exactly half of 26, the alphabet's length — shifting by half the alphabet twice walks all the way around back to where you started. Any other shift needs the COMPLEMENTARY shift (26 minus the original) to reverse it, not a second application of the same shift. Shift by 5 twice gives you shift 10, not the original text.

Why do digits, spaces and punctuation pass through unchanged?

A Caesar cipher only has a defined action on the 26-letter alphabet — there is no sensible "shift" for a digit, a space, or a symbol. Non-Latin unicode letters (é, ñ, Ω, and so on) pass through the same way, since they aren't part of the 26-letter A-Z alphabet this shift is defined over either.

Is this actually secure?

No. A Caesar cipher is trivially broken by frequency analysis, or simply by trying all 25 non-trivial shifts and reading off which one produces real words. It is a puzzle and obfuscation tool — hiding a spoiler, say — not encryption, and should never be used to protect anything that actually needs to stay secret.