ROT13 Decoder & Encoder

Instantly encode or decode text using ROT13 — the self-reciprocal Caesar cipher with a fixed shift of 13 positions.

11 characters
Fixed shift of 13 · self-inverse — apply ROT13 again to reverse it. Letters rotate; numbers and punctuation pass through unchanged.Client-side · no upload

What Is ROT13?

ROT13 (short for "rotate by 13 places") is a special case of the Caesar cipher that shifts every letter in the alphabet by exactly 13 positions. Because the English alphabet contains 26 letters — exactly twice 13 — the operation is perfectly symmetrical: applying ROT13 to an already ROT13-encoded message returns the original text. This self-inverse property makes ROT13 unique among Caesar cipher variants and gives it a special place in internet culture and computer science.

The transformation is simple: A becomes N, B becomes O, C becomes P, and so on. Letters in the second half of the alphabet wrap back around: N becomes A, O becomes B, and Z becomes M. Non-alphabetic characters — digits, spaces, punctuation — remain unchanged.

ROT13 Decoder, Encoder and Translator: One Operation

Searches for a ROT13 decoder, ROT13 encoder, ROT13 translatoror "ROT13 decoder online" all lead to the same function. ROT13 has no key and no direction, so the box above encodes plain text and decodes ROT13 text with the same click. Paste, read the result, and copy it. Nothing is sent anywhere: the rotation runs in your browser.

The ROT13 Alphabet Table

This is the complete substitution. Each letter in the top row becomes the letter below it, and the table reads the same in reverse.

ABCDEFGHIJKLM
NOPQRSTUVWXYZ
NOPQRSTUVWXYZ
ABCDEFGHIJKLM

Worked Examples: What the Tool Actually Returns

Each result below is produced by running the input through the same function as the tool above, so it shows the real behaviour: two typical uses, a boundary, a limit and a pitfall.

Typical: hiding a punchline

Input

Why did the chicken cross the road?

Result

Jul qvq gur puvpxra pebff gur ebnq?

Every letter moves 13 places and the spaces, capital W and question mark stay where they are.

Typical: decoding a message you were sent

Input

Jul qvq gur puvpxra pebff gur ebnq?

Result

Why did the chicken cross the road?

There is no separate decode mode. Pasting ROT13 text and running it again gives the original back.

Boundary: the two halves of the alphabet

Input

AMNZ amnz

Result

NZAM nzam

A to M move forward into N to Z, and N to Z wrap round into A to M. That is why 13, exactly half of 26, makes the cipher its own inverse.

Limit: accents, other alphabets and digits

Input

Café ñandú Привет 123

Result

Pnsé ñnaqú Привет 123

Only the 26 ASCII letters rotate. In Café the C, a and f change but the é stays as it is, and the Cyrillic word and the digits pass through untouched.

Pitfall: text that was not ROT13

Input

Khoor

Result

Xubbe

Khoor is Hello shifted by 3, not 13. The tool still rotates it and returns Xubbe, which is nonsense. A decoder cannot tell you which cipher was used, so if the output is gibberish try the Caesar tool.

How to Recognise ROT13 Text

ROT13 keeps word lengths, spaces and punctuation, so the shape of the text still looks like English even though the letters do not. Short common words give it away. Scan for these forms and, if you find a few, run the text through the tool:

English wordIn ROT13
thegur
andnaq
togb
ofbs
withjvgu
thatgung
isvf
youlbh

If none of these show up and the output is still gibberish, the text probably used a different shift. Try the Caesar cipher tool or the cipher identifier. For more starter ciphers to compare, see the best cipher for beginners, and for paper practice, the Caesar cipher worksheet, since ROT13 is a Caesar shift of 13.

The Self-Reciprocal Property

The defining feature of ROT13 is its self-reciprocal nature. Unlike most ciphers that require separate encryption and decryption procedures, ROT13 uses exactly the same algorithm for both operations. If you encode "HELLO" you get "URYYB." Encode "URYYB" and you get "HELLO" back. Mathematically, this works because shifting by 13 twice equals shifting by 26, which is a complete cycle through the alphabet — returning every letter to its starting position.

This property means that a single function handles both encoding and decoding, making ROT13 particularly convenient for software implementations. There is no key to manage, no direction to specify, and no risk of applying the wrong operation.

History and Internet Culture

ROT13 rose to prominence on Usenet newsgroups in the early 1980s. Before the World Wide Web, Usenet was the primary discussion platform for internet users. Groups dedicated to jokes, puzzles, and movie discussions needed a way to post content that readers could choose to reveal — such as joke punchlines, puzzle solutions, and movie spoilers. ROT13 became the de facto standard for this purpose because it was trivial to implement and available in every Unix system through the tr command.

The convention persists today. Many online forums, Reddit communities, and puzzle sites still use ROT13 to hide spoilers. The cipher has also become a running joke in the programming community — with ironic references to "military-grade ROT13 encryption" serving as commentary on weak security practices.

ROT13 in Programming

ROT13 is a favorite introductory programming exercise because it teaches string manipulation, character code arithmetic, and conditional logic in a compact, testable format. On Unix and Linux, the canonical one-liner is: echo "message" | tr 'A-Za-z' 'N-ZA-Mn-za-m'. Python offers a built-in codec: import codecs; codecs.encode("message", "rot_13"). In JavaScript, developers typically iterate through each character, check if it falls in the A-Z or a-z range, and apply the appropriate shift using charCodeAt and String.fromCharCode.

Extended ROT Variants

Several variants extend the ROT13 concept. ROT5 applies the same principle to the ten digits (0-9), shifting each digit by 5 positions. ROT47 operates on the 94 printable ASCII characters (codes 33-126), rotating each by 47 positions, which allows it to handle letters, digits, and symbols together. ROT18 is a combination of ROT13 on letters and ROT5 on digits. These variants are used when numbers and special characters must also be obscured.

Why ROT13 Is Not Encryption

It cannot be stressed enough that ROT13 provides zero security. There is no secret key — anyone who recognizes the pattern (or simply tries ROT13 as a first guess) can immediately read the hidden text. ROT13 is better categorized as text obscuring or light obfuscation rather than encryption. It prevents casual glancing but not deliberate reading. For actual security, use modern encryption standards such as AES-256 or RSA.

Frequently Asked Questions

ROT13 (rotate by 13 places) replaces each letter with the letter 13 positions after it in the alphabet, so A becomes N and N becomes A. The English alphabet has 26 letters, so applying ROT13 twice returns the original text: the same operation both encodes and decodes.
Paste the ROT13 text into the box. The result is the decoded text, because decoding is the same operation as encoding. If the output still looks like nonsense, the text was probably not ROT13; it may use a different Caesar shift.