twoodo
/

Home/Tools/Encoding & ciphers

ROT13 Encoder and Decoder

Encoding and decoding are the same operation.

A cipher that undoes itself

ROT13 shifts every letter thirteen places through the alphabet. A becomes N, B becomes O, and so on. Because thirteen is exactly half of twenty-six, applying it twice returns you to where you started.

That is its whole appeal: one function encodes and decodes, so there is nothing to get wrong and no key to remember.

It was never meant to hide anything

ROT13's purpose is to stop you reading something by accident. It spread on Usenet in the 1980s for exactly one job: posting a punchline, a film spoiler or an offensive joke in a form that would not leap off the screen at someone scrolling past.

As security it is worthless and everyone involved knew it. There is no key, the method is universally known, and any reader can decode it with a keystroke in their newsreader. It is a politeness mechanism rather than a cipher, and it is genuinely well designed for that.

The joke in cryptography circles is that applying ROT13 twice gives you ROT26, which is unbreakable in the sense that it does nothing at all.

ROT47, for when letters are not enough

ROT13 leaves digits, punctuation and spaces alone, so the shape of the text survives — you can see word lengths and sentence structure. ROT47 rotates all 94 printable ASCII characters instead, which scrambles punctuation too and is also its own inverse.

Where it still appears

  • Spoiler tags in forums and comment threads.
  • Puzzle hunts and CTF challenges, usually as a first layer.
  • Obfuscating strings in source code, where it is a speed bump and nothing more.
  • The answer to crossword clues in some publications.

Common uses

  • Reading a spoiler someone has hidden.
  • Hiding a punchline from casual view.
  • The first step in a puzzle chain.

Questions people ask

How do I decode ROT13?

By applying ROT13 again. Thirteen is half of twenty-six, so the operation is its own inverse.

Is ROT13 secure?

Not remotely, and it never claimed to be. It exists to stop you reading something accidentally, not to stop you reading it at all.

What happens to numbers and punctuation?

Nothing. ROT13 only touches letters, which is why the shape of the text survives. ROT47 rotates punctuation too.

Why thirteen?

Because it is half of twenty-six, which makes encoding and decoding the same operation.

What is ROT47?

The same idea applied to all 94 printable ASCII characters, so punctuation is scrambled as well. Also its own inverse.

None of this is security

The ciphers on this site are historical. Every one of them was broken centuries ago, and a modern computer breaks them in microseconds — the Caesar page shows the break happening rather than just describing it.

They are worth knowing for puzzles, for teaching, for reading old texts and for understanding where cryptography came from. They are not worth using to protect anything. If you need something kept secret, you need modern encryption with a properly managed key, and you should not be building it yourself.

The encodings — Morse, binary, hex, NATO — make no secrecy claim at all. They exist to move information over a channel, and anyone can read them.

Your text stays in the page

Everything runs in your browser. Nothing you type is transmitted, logged or stored, and this site has no server that could receive it. The about page lists every request the site makes.