Skip to content
Case Converter Online
en

ROT13 Encoder and Decoder

Type text to scramble it with ROT13, or paste ROT13 text to read it. The same step does both, and you can switch to ROT18 or ROT47 to include numbers and symbols.

ROT13 undoes itself, so the same step encodes and decodes.

What ROT13 is

ROT13 means “rotate by 13 places”. Each letter is replaced by the letter 13 steps further along the alphabet. A becomes N, B becomes O, and N wraps round to A. Capitals stay capitals, and everything that is not a letter stays where it is.

Because the alphabet has 26 letters, rotating by 13 twice brings you back to the start. That makes ROT13 its own inverse: the same operation encodes and decodes. You never have to ask “which direction?”

ROT13 became popular on Usenet newsgroups in the 1980s as a polite way to hide spoilers, punchlines and puzzle answers. Readers who wanted to see them could decode them in one step. It is still used on forums, in geocaching hints and in programming exercises.

How to use the tool

  1. Type or paste text into Text on the left. The ROT13 version appears in ROT13 text on the right.
  2. To read a scrambled message, paste it into ROT13 text. The plain version appears on the left.
  3. Choose another rotation from Variant if you need one:
    • ROT13: letters only
    • ROT18: letters and digits
    • ROT47: all visible ASCII
  4. Press Copy above either box to copy it, or Clear to empty both.

Examples

These outputs come from running each variant on this page.

Text ROT13 ROT18 ROT47
Hello, World! Uryyb, Jbeyq! Uryyb, Jbeyq! w6==@[ (@C=5P
Room 42 Ebbz 42 Ebbz 97 #@@> ca
Code 2026 Pbqr 2026 Pbqr 7571 r@56 a_ae
Gate 7 opens Tngr 7 bcraf Tngr 2 bcraf v2E6 f @A6?D
To get to the other side! Gb trg gb gur bgure fvqr! Gb trg gb gur bgure fvqr! %@ 86E E@ E96 @E96C D:56P

The full ROT13 alphabet looks like this, with the plain letters on top and their ROT13 partners below:

abcdefghijklmnopqrstuvwxyz
nopqrstuvwxyzabcdefghijklm

The first half maps to the second half and the second half maps back to the first: a to n, n to a, z to m.

The three variants

ROT13 rotates only A to Z and a to z by 13 places. Digits, spaces, punctuation and accented letters are not touched. This is the classic version and the one people mean by default.

ROT18 is ROT13 for letters plus ROT5 for digits. Each digit moves 5 places, so 0 becomes 5, 1 becomes 6 and 9 becomes 4. It also undoes itself.

ROT47 works on the 94 visible ASCII characters from ! to ~, which covers letters, digits and common symbols. Each one moves 47 places. Since 47 is half of 94, ROT47 also undoes itself. The output looks much less like text, which is the point, but it can contain characters such as backticks and pipes that some chat apps treat as formatting.

Spaces and characters outside these ranges, such as emoji and accented letters, are left alone in every variant.

Limits

ROT13 is a special case of the Caesar cipher with a shift of 13. It offers no security at all. There is no key, and many people can read short ROT13 words by sight. Use it to hide a spoiler from a quick glance, never to protect a password or a private message.

It also does nothing for non-English alphabets. Greek, Cyrillic or Arabic text passes through unchanged.

Other ways to apply ROT13

On Linux, macOS or Git Bash, the tr command does ROT13 in one line:

echo 'Hello, World!' | tr 'A-Za-z' 'N-ZA-Mn-za-m'

This prints Uryyb, Jbeyq!. Run the output through the same command to get the original back.

Python has ROT13 built into the standard library:

import codecs
codecs.encode('Hello, World!', 'rot13')

That also returns Uryyb, Jbeyq!.

In Vim, select text and press g? to ROT13 it. Some email clients and text editors include a ROT13 command in their menus as well.

In a spreadsheet you would need to process each character with CODE, MOD and CHAR, which is slow to set up. Pasting the text here is easier.

For any other shift, use the Caesar cipher tool, which also cracks unknown shifts. To turn letters into numbers, use the A1Z26 cipher. To encode text so it survives email and URLs, rather than to hide it, use Base64.

ROT13 Encoder: questions and answers

How do I decode ROT13?

Paste the ROT13 text into the right-hand box. The readable text appears on the left. You can also paste it into the left box, because running ROT13 twice gives back the original.

Why does ROT13 not change numbers?

ROT13 only rotates the 26 letters of the English alphabet. To scramble digits as well, choose ROT18, which adds a rotation of 5 for 0 to 9. ROT47 goes further and rotates every visible ASCII character, including punctuation.

Is ROT13 encryption?

No. It has no key and anyone can reverse it instantly. It is meant to stop people reading something by accident, such as a spoiler or a puzzle answer, not to keep it secret.

What does Uryyb mean?

Uryyb is Hello in ROT13. H becomes U, e becomes r, and each l becomes y. It is often used as a quick example because Hello, World! turns into Uryyb, Jbeyq!

More code and data tools

See all tools