Skip to content

ROT13 Decoder and Encoder Online

Paste your text and the result appears as you type, with no key to set.

Result

Each letter swaps with the one in its column

The letter pairs: A N, B O, C P, D Q, E R, F S, G T, H U, I V, J W, K X, L Y, M Z.

advertisement

What is ROT13?

ROT13 stands for “rotate by 13 places”. It replaces each letter with the one 13 places further along the alphabet, so A becomes N and N becomes A. It is a Caesar cipher with the shift fixed at 13, which means there is no key to remember. Numbers, punctuation and accented letters stay as they are.

How ROT13 works

Find each letter in the table above and write down the other letter in its column. Upper and lower case carry over.

How ROT13 works
Text HELLO
ROT13 URYYB
ROT13(x) = (x + 13) mod 26

To do it with numbers, count A as 0 and Z as 25, add 13, and wrap around past 25. H is 7, and 7 + 13 = 20, which is U. U is 20, and 20 + 13 = 33, and 33 mod 26 = 7, which takes you back to H.

Why the same step decodes

The alphabet has 26 letters and 13 is exactly half of that. Two rounds of ROT13 move each letter 26 places, a full lap, and it lands where it started. That is why there is no separate decode mode: run coded text through once and you can read it. Any other Caesar shift needs a different shift to undo it, apart from a shift of 0, which changes nothing.

What is ROT13 used for?

Its job is to stop you reading something by accident. Early Usenet groups used it in the 1980s to hide offensive jokes and spoilers, so that readers had to choose to decode them. Geocaching hints still use it, as do forum spoilers and puzzle answers. It also turns up in programming exercises because it is short and easy to test.

How to recognise ROT13 text

Word lengths and punctuation look normal, but the words themselves are gibberish. Short common words are the giveaway: “gur” is “the” and “naq” is “and”. If you are not sure, paste the text above. For a shift other than 13, try the solver in our Caesar cipher decoder, which tests all of them.

Is ROT13 encryption?

Only in the loosest sense. It has no key, and anyone can reverse it in a moment, so it is better described as hiding than protecting. Never use it for passwords or private data. If you want to see how a keyword makes a cipher harder to break, try the Vigenère cipher.

Frequently asked questions

What is the ROT13 alphabet?

A to M pair with N to Z: A–N, B–O, C–P, D–Q, E–R, F–S, G–T, H–U, I–V, J–W, K–X, L–Y and M–Z. Each pair works in both directions.

How do I decode ROT13 on Linux?

Use the tr command: echo "Uryyb" | tr 'A-Za-z' 'N-ZA-Mn-za-m' prints Hello.

Does ROT13 change numbers?

No. It only changes the 26 letters from A to Z. Digits, spaces, punctuation and accented letters pass through unchanged.

Is my text sent to your server?

No. The tool on this page runs in your browser, so your text is not sent to our server.

More cipher tools and guides