ROT13 Encoder / Decoder

ROT13 Encoder / Decoder

Free ROT13 encoder and decoder: instant bidirectional conversion with live preview. ROT5, ROT18, ROT47, visual alphabet mapping (A↔N), no signup.

Updated June 2026

Encode = Decode
0 characters
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

26 ÷ 2 = 13 — each letter maps to its exact mirror partner in the alphabet

Speed
Instant
Privacy
Local Only

Free ROT13 Encoder / Decoder — The Self-Inverse Cipher

Paste any text into the input panel and the ROT13 output appears instantly — no button to press. What makes ROT13 unique is that the same operation both encodes and decodes: type encoded text in and you get the original back out. There is no separate "encode mode" or "decode mode" because ROT13 is its own inverse.

ROT13 is a substitution cipher that replaces each letter with the letter 13 positions ahead in the alphabet. Because the English alphabet has exactly 26 letters and 13 is half of 26, applying the shift twice completes a full circle back to the starting letter. This tool also supports ROT5 (digits), ROT18 (letters and digits together), ROT47 (all printable ASCII), and a custom shift from 1 to 25.

How to Use the ROT13 Encoder

Encoding or decoding ROT13 text is a single step:

  1. Paste or type your text — the output appears instantly in the right panel as you type, no submit button required.
  2. Switch variant if needed — select ROT5 to rotate digits (0→5, 1→6…), ROT18 to rotate both letters and digits simultaneously, ROT47 to rotate all visible ASCII including punctuation, or Custom to set any shift from 1 to 25.
  3. Copy the result — click the Copy button or press Shift+Enter from anywhere outside the text area — the encoded text is immediately on your clipboard.
  4. Apply again to verify the self-inverse property — click "Apply again" to pass the output back as input; for ROT13, ROT5, ROT18, and ROT47, you get back exactly the original text.

ROT13 Examples

Here are concrete examples showing what the tool produces with different inputs.

Input ROT13 Output
Hello, World! Uryyb, Jbeyq!
Uryyb, Jbeyq! Hello, World!
ROT13 EBG13
The quick brown fox Gur dhvpx oebja sbk
123 test 123 grfg

Numbers (123) and spaces pass through ROT13 unchanged — only the 26 Latin letters rotate. Use ROT5 to rotate digits, or ROT47 to encode everything including punctuation.

Edge case — applying ROT13 twice:

Input:             Hello, World!
After ROT13:       Uryyb, Jbeyq!
After ROT13 again: Hello, World!

This is the defining property: ROT13(ROT13(x)) = x for any text x.

What Is ROT13 — The Self-Inverse Cipher

ROT13 ("Rotate by 13") replaces each letter with the letter 13 positions ahead in the alphabet. A becomes N, B becomes O, C becomes P, and so on, wrapping around so that Z becomes M.

Plain:   A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
ROT13:   N O P Q R S T U V W X Y Z A B C D E F G H I J K L M

The cipher creates 13 exact letter pairs — every letter has one and only one partner: 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. Because each pair is bidirectional, encoding and decoding are the same operation.

ROT13 was popularized on Usenet in the 1980s–1990s as a social convention. Rather than withholding content, Usenet users posted spoilers, offensive jokes, or adult content encoded in ROT13 — clearly labeled so readers could choose whether to decode it. ROT13 continues in online communities today, appearing in Reddit threads, puzzle communities, and ARG (alternate reality game) challenges. It is not encryption: anyone who knows what ROT13 is can decode it in seconds.

The ROT Family — ROT5, ROT18, ROT47

ROT13 belongs to a family of rotation ciphers, each targeting a different character set:

  • ROT5 rotates digits 0–9 by 5 positions (0→5, 1→6, …, 9→4). Since there are 10 digits and 5 is half of 10, ROT5 is also self-inverse. Example: 202475792024.
  • ROT18 applies ROT13 to letters and ROT5 to digits in a single pass. Hello 2024Uryyb 7579. Self-inverse for the same mathematical reason.
  • ROT47 shifts all 94 printable ASCII characters (from ! to ~) by 47 positions — exactly half of 94 — making it self-inverse as well. Punctuation and digits also change, producing more thoroughly garbled output.

All four share the same property: the shift is exactly half the size of the character set, guaranteeing that applying the cipher twice returns to the original.

Common Use Cases

  • Hiding spoilers: The original Usenet use case — posting movie or book spoilers in discussions where readers actively choose to decode rather than stumble into them.
  • Puzzle and ARG design: ROT13 appears as a layer in escape rooms, ARGs, and CTF (Capture the Flag) competitions where participants must recognize and decode it.
  • Teaching cipher concepts: ROT13 is the simplest real cipher to implement, making it the standard starting point for cryptography education in classrooms and tutorials.
  • Obfuscating text in source code: Developers sometimes store strings that shouldn't be immediately human-readable using ROT13 — not for security, but to prevent accidental reading during code review or in log files.
  • Testing text-processing pipelines: Because ROT13 is deterministic and reversible, it is useful for verifying that text pipelines handle transformations and Unicode boundaries correctly.

Common Mistakes with ROT13

  • Using it as encryption: ROT13 provides zero cryptographic security. Any developer who sees it can decode it instantly without a key. For protecting sensitive data, use AES-256, RSA, or similar modern algorithms.
  • Expecting numbers to change: Standard ROT13 only shifts the 26 Latin letters. Numbers, spaces, and punctuation pass through unchanged. Use ROT18 or ROT47 if you need digits or symbols encoded too.
  • Forgetting that ROT13 is case-preserving: Uppercase letters map to uppercase, lowercase to lowercase. HelloUryyb, not URYYB. The case structure of the original text is preserved in the output.

Frequently Asked Questions

What is ROT13 and how does it work?

ROT13 ("Rotate by 13") replaces each letter with the letter 13 positions ahead in the alphabet — A becomes N, B becomes O, and so on through M→Z, then wrapping back: N→A, O→B, through Z→M. It is a special case of the Caesar cipher with a fixed shift of 13. Because 13 is exactly half of the 26-letter alphabet, the same function both encodes and decodes text.

Why is ROT13 its own decoder — why is there no separate decode button?

Because 13 × 2 = 26: shifting any letter by 13, then shifting the result by 13 again, moves it a total of 26 positions — the full alphabet — landing back at the start. This makes ROT13 involutory: a function that is its own inverse. The same principle applies to ROT5 (5 × 2 = 10 digits), ROT18 (combined), and ROT47 (47 × 2 = 94 ASCII printable characters).

Is ROT13 encryption? Can it protect sensitive data?

No. ROT13 provides zero cryptographic security — anyone who recognizes it can decode it immediately, no key required. It was designed for social courtesy (hiding spoilers and content readers can choose to see), not for protecting data. For sensitive data, use modern encryption such as AES-256 or RSA. ROT13 is appropriate only for obfuscating text from casual visual inspection.

What does ROT13 do to numbers, spaces, and punctuation?

Standard ROT13 leaves numbers, spaces, and all punctuation completely unchanged — only the 26 Latin letters (A–Z, uppercase and lowercase) rotate. Hello, 2024! becomes Uryyb, 2024!. Use ROT5 to rotate digits (0–9), ROT18 to rotate both letters and digits simultaneously, or ROT47 to rotate all 94 printable ASCII characters including punctuation.

What is the difference between ROT13 and ROT47?

ROT13 shifts only the 26 letters of the Latin alphabet, leaving numbers, spaces, and punctuation untouched. ROT47 shifts all 94 printable ASCII characters — letters, digits, and most punctuation — by 47 positions. ROT47 produces output that looks more thoroughly garbled because symbols and numbers also change. Both are self-inverse, but ROT47 is useful when you need to obscure content that contains symbols and numbers alongside text.

Resources

  • Wikipedia — ROT13 — Comprehensive article covering ROT13's history, mathematical properties, and cultural uses on Usenet and the internet.
  • Wikipedia — Caesar cipher — Background on the general substitution cipher of which ROT13 is a special case with shift = 13.
  • Python docs — codecs module — Official Python documentation showing ROT13's built-in support via codecs.encode(text, 'rot_13').

Related Tools