Apply the ROT13 letter-substitution cipher. Because it shifts by 13, the same action both encodes and decodes.
Text • cipher
Encoding and decoding share the page, so any result can be pasted straight back to confirm it round-trips to the text you started with — the quickest check that nothing was mangled.
Results are recalculated on every keystroke, with no submit step and no page reload, so a value can be adjusted until the answer looks right rather than guessed once.
Everything runs in your browser — no account, no uploads, nothing leaves your device.
ROT13 ("rotate by 13") is a simple substitution cipher that shifts each letter 13 places in the alphabet. Because the alphabet has 26 letters, applying ROT13 twice returns the original text — so the same action both encodes and decodes.
It is used to hide spoilers, puzzle answers and punch-lines in plain sight, not for real security. Type any text to scramble or unscramble it instantly, all in your browser.
ROT13 shifts each letter thirteen places through the alphabet, wrapping around at the end. Because thirteen is exactly half of twenty-six, the transformation is its own inverse — applying it twice returns the original text, so encoding and decoding are the same operation. It offers no security whatsoever and was never intended to: its purpose on early Usenet was to hide spoilers and punchlines from casual reading, requiring a deliberate act to reveal them. It is a Caesar cipher, breakable by inspection, and calling it encryption would be a category error.
For letters: new = ((old − base + 13) mod 26) + basebase = 65 for uppercase, 97 for lowercaseNon-letters pass through unchangedROT13(ROT13(x)) = x — self-inversewhere:
Assumptions: Provides no confidentiality and must never be used to protect anything. ROT47 extends the idea across printable ASCII including digits and punctuation, and is equally insecure.
Apply the shift letter by letter, then demonstrate the self-inverse property.
Result"Attack" becomes "Nggnpx" — and applying it again restores it
Note that case is preserved because each case uses its own base, and that the round trip is exact. The self-inverse property is the whole appeal: one function serves both directions, and no key needs to exist because there is no secret.
ROT13 is a Caesar shift with the offset fixed at thirteen, and thirteen is exactly half of twenty-six. That single choice makes it its own inverse: applying it twice returns the original text, so one function both scrambles and restores, and no key needs to be stored or transmitted. It is the simplest possible reversible transformation of the alphabet, and its simplicity is the entire design.
The purpose was never secrecy but consent. On early Usenet groups it hid spoilers, punchlines and answers from readers scrolling past, while remaining trivially readable by anyone who chose to decode it. That is a social convention implemented in text rather than a security control, and treating it as protection for anything sensitive misunderstands what it was built for — the transformation is public and reversing it requires no information at all.
The scheme only touches the twenty-six letters of the basic alphabet, leaving digits, punctuation, accented characters and spacing untouched, which is why the shape of a ROT13 string is instantly recognisable. ROT47 extends the same idea across the printable ASCII range so that numbers and symbols are shifted too, at the cost of producing output that no longer looks like text at all.