ROT13 Encoder

Encode text to ROT13. Free ROT13 encoder.

Variant
Direction

Looking for the decoder? ROT13 Decoder

Rate this tool

How useful was this tool?

ROT13 Encoder

Type or paste into Text, or load the Example, choose a variant and Encode or Decode, and the result appears under Result. There are four variants:

  • ROT13: letters shifted by 13. It’s its own inverse.
  • ROT-N: letters shifted by a number you choose, a Caesar cipher. Set the Shift from 1 to 25.
  • ROT18: letters shifted by 13 and digits by 5.
  • ROT47: every printable ASCII character shifted by 47, digits and punctuation too.

The summary line counts what happened, for example “61 characters: 47 letters rotated, 0 digits rotated, 14 left as they are”. Letters map as shows where every letter goes under the chosen shift (A → N, B → O and so on), with a digit map for ROT18. Use the result as input swaps the result back into the box, Copy takes it, and Clear starts over.

Everything runs in your browser.

Example

The classic use is a joke with the punchline hidden, so readers only see it if they decide to. The Example loads exactly that:

Why did the chicken cross the road?
Gb trg gb gur bgure fvqr.

Run ROT13 on it and the two lines swap roles. The question turns into “Jul qvq gur puvpxra pebff gur ebnq?”, and the punchline becomes readable: “To get to the other side.” The summary reads 61 characters: 47 letters rotated, 0 digits rotated, 14 left as they are. The 14 are the spaces, the line break, the question mark and the full stop.

The four variants

Variant Input Result
ROT13 Hello, World! Uryyb, Jbeyq!
ROT-N, shift 3 Veni, vidi, vici Yhql, ylgl, ylfl
ROT18 Meet at 2026 Zrrg ng 7571
ROT47 Hello, World! w6==@[ (@C=5P

ROT13 only touches the letters A to Z. Digits, punctuation and spaces stay as they are, so the shape of the text, and the length of every word, is still visible.

ROT-N is the Caesar cipher. Julius Caesar is said to have used a shift of 3, which is why “Veni, vidi, vici” becomes “Yhql, ylgl, ylfl”.

ROT18 adds the digits: each one moves 5 places, so 2026 becomes 7571. Numbers in the text stop giving the answer away.

ROT47 shifts all 94 printable ASCII characters, from ! to ~. The result no longer looks like words at all: even spaces between words are the only thing left untouched.

Why ROT13 decodes itself

The alphabet has 26 letters, and 13 is half of that. Shift by 13 twice and every letter is back where it started, so encoding and decoding are the same operation. The same trick works for the others: ROT47 shifts by half of 94 printable characters, and ROT18 moves digits by 5, half of 10.

That’s why the tool notes that both directions give the same result for ROT13, ROT18 and ROT47. ROT-N with any other shift is different. Encoding with a shift of 3 has to be undone by decoding with 3, or by shifting forward 23.

Cracking a Caesar cipher: try every shift

If you’ve got a Caesar cipher and don’t know the shift, there are only 25 possibilities. The Try every shift panel lists your text under all of them, numbered by how far each line shifts the letters back. As the panel puts it: when you don’t know the shift, the readable line gives it away. Take:

Tlla tl ha uvvu

Around the middle of the panel you’ll find:

6   Nffu nf bu oppo
7   Meet me at noon
8   Ldds ld zs mnnm

Line 7 is the only one that makes sense: the message was shifted by 7. Click Use on that line to take it as your result.

In the built-in example, the punchline line becomes readable on line 13, which is ROT13 itself. This is also exactly why a Caesar cipher offers no protection: anyone can try all 25 shifts in a second.

Where ROT13 is still used

  • Spoilers and punchlines. ROT13 became the convention on Usenet newsgroups in the 1980s for hiding spoilers and jokes, and forums and puzzle sites still use it.
  • Geocaching. Cache hints on Geocaching.com are shown in ROT13, so you only read the hint if you choose to.
  • Puzzles and capture-the-flag challenges, where a ROT13 or Caesar step is a common first layer.
  • Windows. The UserAssist entries in the Windows registry, which record the programs a user has run, store their names in ROT13. Anyone investigating a PC decodes them this way.

Some words even turn into other words: “gnat” becomes “tang”, and “abjurer” becomes “nowhere”.

It hides text; it doesn’t protect it

ROT13 and its relatives are not encryption. There’s no key, there are at most 25 shifts to try, and letter patterns survive. In “Uryyb”, the double “yy” still stands where “ll” was. Use them to keep text from being read by accident, never to keep it secret.

FAQ

Is there a difference between encoding and decoding?

For ROT13, ROT18 and ROT47, no: they’re the same operation. For ROT-N, decoding shifts the letters back by the number you set. The ROT13 Decoder is there if that’s what you were looking for.

What happens to accented letters and other alphabets?

ROT13, ROT18 and ROT-N only shift A to Z, and ROT18 also shifts 0 to 9. ROT47 shifts the printable ASCII characters. Everything else, including é, ñ, Cyrillic, Chinese and emoji, is left as it is and counted in the stats as left alone.

How do I do ROT13 in code or on the command line?

  • Python: codecs.encode(text, 'rot13')
  • Linux or macOS terminal: echo 'Hello' | tr 'A-Za-z' 'N-ZA-Mn-za-m'

Is ROT13 the same as Base64?

No. ROT13 swaps letters for other letters. Base64 turns any data into a different set of characters for safe transport. Neither one is encryption.

Note: All processing is done client-side. We do not store or see your data.

Contact

Missing something?

Feel free to request missing tools or give some feedback using our contact form.

Contact Us