DevToolsmith

ROT13 Encoder and Decoder

Encode or decode ROT13 as you type: the same operation does both. Switch to ROT47 to also hide digits and punctuation, or to a Caesar cipher with any shift from 1 to 25 to encrypt and decrypt classic shift ciphers.

Runs 100% in your browser — nothing is uploaded

Input
Tip: drop a file here61 chars · 61 bytes · 1 line
Output
61 chars · 61 bytes · 1 line

ROT13 vs ROT47 vs Caesar

CipherHello, World! 2026 becomesWhat it changes
ROT13 Uryyb, Jbeyq! 2026 Letters only; applying it twice gives back the original
ROT47 w6==@[ (@C=5P a_ae All printable ASCII from ! to ~, including digits and punctuation
Caesar, shift 3 Khoor, Zruog! 2026 The cipher Julius Caesar is said to have used

ROT13 in code

Python
import codecs

codecs.encode("Hello, World!", "rot13")   # 'Uryyb, Jbeyq!'
Shell
echo 'Hello, World!' | tr 'A-Za-z' 'N-ZA-Mn-za-m'   # Uryyb, Jbeyq!
JavaScript
const rot13 = (s) =>
  s.replace(/[a-z]/gi, (c) => {
    const base = c <= 'Z' ? 65 : 97;
    return String.fromCharCode(((c.charCodeAt(0) - base + 13) % 26) + base);
  });

Want to hide text in another way? Try Morse code, reverse text or Base64, none of which are encryption either.

Frequently asked questions

What is ROT13?

A substitution cipher that replaces each letter with the one 13 places later in the alphabet, wrapping around: A becomes N, N becomes A. Because the English alphabet has 26 letters, shifting by 13 twice gets you back where you started, so the same operation encodes and decodes. Digits, punctuation and non-Latin letters are left alone.

Is ROT13 secure?

No, not at all. It has no key, so anyone can reverse it instantly. It’s used to hide text from a casual glance, like spoilers, puzzle answers and punchlines in forums and Usenet, not to protect anything. For real secrecy use proper encryption such as AES, and for passwords use a password hash like bcrypt.

What’s the difference between ROT13, ROT47 and a Caesar cipher?

ROT13 is a Caesar cipher with a shift of 13. A Caesar cipher can use any shift from 1 to 25, and decoding needs the opposite shift. ROT47 rotates all 94 printable ASCII characters by 47 instead of just the letters, so numbers and symbols are hidden as well; like ROT13, it is its own inverse.

How do I crack a Caesar cipher?

Try all 25 shifts; only one gives readable text. Choose Caesar shift and step through the shift number until the output makes sense. For longer texts, the most common letter in the ciphertext usually stands for E.