ROT13 / ROT-N Encoder — Free Online Tool

ROT13 encoder/decoder. Caesar cipher with 13-letter shift (A→N, B→O). Reversible encryption. Obfuscate text, spoilers, Easter eggs, Usenet.

Use this free online ROT13 / ROT-N Encoder directly in your browser. No signup required, no data leaves your device. Part of Utilier — a collection of 133+ developer utilities.

What is ROT13 Encoder/Decoder (Caesar Cipher, Letter Substitution)?

ROT13 (rotate by 13 places) is a letter substitution cipher that replaces each letter with the letter 13 positions ahead in the alphabet. A simple Caesar cipher with shift of 13. Converts: A→N, B→O, C→P, ..., M→Z, N→A, O→B, ..., Z→M. Reversible: applying ROT13 twice returns original (ROT13(ROT13(text)) = text, since 13+13 = 26 = full alphabet cycle). Case-preserving: uppercase stays uppercase (Hello → Uryyb), numbers and punctuation unchanged (Hello123! → Uryyb123!). Not encryption (trivial to break: shift known, frequency analysis, online decoders). Uses: obfuscate text (spoilers, quiz answers, Easter eggs), Usenet tradition (hide offensive content, punchlines), educational (learn Caesar cipher, cryptography basics), geocaching (puzzle caches), simple text transformation.

  • Letter substitution (A→N): Each letter → 13 positions ahead. A→N, B→O, C→P, D→Q, ..., M→Z (first half). N→A, O→B, P→C, ..., Z→M (second half). 26-letter alphabet: shift 13 = halfway point.
  • Reversible (self-inverse): ROT13(ROT13(x)) = x. Apply twice → original. Example: Hello → Uryyb → Hello. Same algorithm for encoding/decoding (no separate decrypt). 13 + 13 = 26 (full cycle).
  • Case-preserving: Uppercase → uppercase (A→N), lowercase → lowercase (a→n). Mixed case: Hello → Uryyb. Numbers, punctuation, spaces unchanged: Hello, World! 123 → Uryyb, Jbeyq! 123.
  • Not secure encryption: Trivial to break: only 26 possible shifts (try all, find readable text). Frequency analysis (E most common in English). Known algorithm (shift 13). Use for obfuscation, not security.
  • Usenet tradition: Usenet (1980s-90s): ROT13 for spoilers, offensive content, punchlines. Reader decodes if interested (opt-in). Email signature: '-- ROT13: [encoded text]'.

Why use rot13?

Need to obfuscate text (not encrypt securely) for spoilers, answers, Easter eggs, or learning cryptography.

  • Hide spoilers: Forums, chat: ROT13 spoilers (movies, TV shows, books). Reader decodes if want spoiler. Example: 'Ending: Wnxr vf gur xvyyre' (ROT13 'Jake is the killer'). Courtesy to avoid accidental spoilers.
  • Quiz answers: Educational content: question + ROT13 answer. Student tries first, then decodes answer. Prevents accidental viewing. Example: Q: 2+2? A (ROT13): Sbhe.
  • Easter eggs in code: Developers: ROT13 strings in code (secrets, jokes). Casual readers don't notice. Curious users decode. Example: const secret = 'Uryyb, Jbeyq!' (Hello, World!).
  • Geocaching puzzles: Geocaching: ROT13 hints, coordinates. Solvers decode to find cache location. Prevents accidental solution reveal. Tradition in puzzle caches.
  • Learn cryptography: Simplest substitution cipher. Understand Caesar cipher (ROT13 = Caesar with shift 13). Learn encryption basics (substitution, frequency analysis, brute force). Educational.
  • Simple obfuscation: Hide text from casual view (not security). Email filters, keyword scanners. ROT13 bypasses simple pattern matching. Not secure against deliberate decryption.

When to use rot13

Use when need reversible text obfuscation (not secure encryption).

  • Hiding spoilers (movies, TV, books, games).
  • Quiz/puzzle answers (educational content, geocaching).
  • Easter eggs in code (secrets, jokes, credits).
  • Usenet tradition (offensive content warnings, punchlines).
  • Learning cryptography (Caesar cipher, substitution ciphers).
  • Bypassing simple keyword filters (email, forums, not recommended for spam).
  • Temporary obfuscation (non-sensitive data, short-term hiding).
  • Testing/debugging (obfuscate test data in logs).

How to use rot13

Enter text, get ROT13 encoded/decoded output (same operation).

  1. Enter text: Type or paste text: Hello, World!. Or upload .txt file. Accepts: letters (A-Z, a-z), numbers, punctuation, Unicode (non-Latin letters unchanged).
  2. Encode/decode: Click 'Apply ROT13' or auto-encode as you type. Output: Uryyb, Jbeyq!. Same button for encode/decode (ROT13 reversible: apply twice → original).
  3. View result: Original: Hello, World!. ROT13: Uryyb, Jbeyq!. Case preserved: H→U (uppercase), e→r (lowercase). Numbers unchanged: 123 → 123.
  4. Copy output: Click Copy to copy ROT13 text. Paste in forum, chat, email. Or download as .txt file. Share obfuscated text.
  5. Decode (apply again): Paste ROT13 text (Uryyb, Jbeyq!), apply ROT13 → original (Hello, World!). Same algorithm for encode/decode. No separate decrypt button needed.
  6. Batch processing (optional): Upload multiple .txt files, apply ROT13 to all. Download as .zip. Useful for bulk obfuscation (geocaching, quiz answers).
  7. Use in code (example): JavaScript: text.replace(/[a-z]/gi, c => String.fromCharCode((c.charCodeAt(0) & 223) + (c.toLowerCase() < 'n' ? 13 : -13))). Python: import codecs; codecs.encode(text, 'rot13').

Key features

  • Reversible (self-inverse): Encode = decode. Apply ROT13 twice → original. No separate encrypt/decrypt. Example: text → ROT13 → text. 13 + 13 = 26 (full alphabet).
  • Case-preserving: Uppercase → uppercase (A→N), lowercase → lowercase (a→n). Mixed case: CamelCase → PnzryPnfr. Preserves readability (structure visible).
  • Non-letter preservation: Numbers, punctuation, spaces, Unicode (non-Latin) unchanged. Hello123! → Uryyb123!. Chinese, Arabic, emoji: unchanged (only A-Z, a-z rotated).
  • Instant encoding: Type → see ROT13 instantly (live preview). No server upload (client-side JavaScript). Fast, private, offline.
  • Copy/download: Copy to clipboard (one-click). Or download as .txt file. Or share URL (some tools encode text in URL fragment: #Uryyb).
  • Batch processing: Encode multiple files at once. Upload .txt files, download ROT13 .zip. Useful for geocaching puzzles, quiz banks.
  • Code examples: Shows ROT13 implementation (JavaScript, Python, shell). Learn algorithm. Copy snippet for your code.

Common use cases

  • Spoiler warnings: Forum post: 'Spoiler (ROT13): Wnxr vf gur xvyyre'. Readers decode if want spoiler. Avoids accidental reveal. Common in TV show subreddits, movie forums.
  • Quiz answers: Educational worksheet: Q: Capital of France? A (ROT13): Cnevf (Paris). Student tries first, decodes if stuck. Prevents cheating (answer not plainly visible).
  • Geocaching hints: Cache hint: 'Ybpngvba: oruvaq gerr' (Location: behind tree). Solver decodes for help. Prevents accidental solution spoiler. Geocaching.com uses ROT13 for hints.
  • Code Easter eggs: JavaScript: const secret = 'Uryyb, Jbeyq!'; // Decodes to 'Hello, World!'. Curious developers decode. Fun credits, jokes, secrets in code.
  • Email obfuscation: Bypass simple keyword filters: email@example.com → rznvy@rknzcyr.pbz (ROT13). Not spam protection (trivial to decode), but hides from basic regex. Not recommended for malicious use.
  • Usenet tradition: Usenet: alt.fan.tv-show: 'Prediction (ROT13): Wbua qvrf va rcvfbqr 5' (John dies in episode 5). Reader decodes if want theory. 1990s internet culture.

Examples

ROT13 encoding/decoding examples.

Simple text (Hello, World!)

Hello, World!
Uryyb, Jbeyq!

H→U, e→r, l→y, o→b, W→J, r→e, d→q. Comma, space, exclamation unchanged. Apply ROT13 again: Uryyb, Jbeyq! → Hello, World! (reversible).

Alphabet (A-Z)

ABCDEFGHIJKLMNOPQRSTUVWXYZ
NOPQRSTUVWXYZABCDEFGHIJKLM

First half (A-M) → second half (N-Z). Second half (N-Z) → first half (A-M). Symmetric mapping.

Spoiler warning

Spoiler: Jake is the killer
Fcbvyre: Wnxr vf gur xvyyre

Obfuscates spoiler. Reader must decode to read. Courtesy in forums (opt-in spoilers). Decode: apply ROT13 again → original.

Numbers and punctuation (unchanged)

Password123! is secret.
Cnffjbeq123! vf frperg.

Letters rotated (P→C, a→n, s→f). Numbers (123) unchanged. Punctuation (!, .) unchanged. Spaces unchanged.

Mixed case (CamelCase)

getUserName
trgHfreAnzr

Case preserved: g→t (lowercase), U→H (uppercase), N→A (uppercase). Function name obfuscated (but structure visible). Reversible.

Technical reference

ROT13 algorithm and properties:

Algorithm
For each letter: shift 13 positions in alphabet. A-M → N-Z (first half → second half). N-Z → A-M (second half → first half). Formula: ((letter - 'A' + 13) % 26) + 'A'.
Alphabet mapping
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. Lowercase: a↔n, b↔o, ..., m↔z. Symmetric: N→A, O→B, etc.
Self-inverse property
ROT13(ROT13(x)) = x. Applying twice returns original. Reason: 13 + 13 = 26 (full alphabet cycle). Same algorithm for encode/decode (no separate decrypt function).
Case handling
Uppercase → uppercase (A→N), lowercase → lowercase (a→n). ASCII: A-Z (65-90), a-z (97-122). Check case: c >= 'A' && c <= 'Z' (uppercase), c >= 'a' && c <= 'z' (lowercase).
Non-letter characters
Numbers (0-9), punctuation (!, ?, .), spaces, Unicode (non-Latin) unchanged. Only A-Z and a-z rotated. Example: Hello123! → Uryyb123!.
Security
NOT secure encryption. Trivial to break: 26 possible shifts (try all in seconds). Frequency analysis: E most common in English → R in ROT13. Known algorithm (public). Use only for obfuscation, not security.
Caesar cipher relation
ROT13 = Caesar cipher with shift 13. Caesar cipher: shift N (0-25). ROT13: N = 13 (special case: self-inverse). Other Caesar shifts (N ≠ 13): not self-inverse (need reverse shift to decrypt).
Implementation
JavaScript: text.replace(/[a-z]/gi, c => String.fromCharCode((c.charCodeAt(0) & 223) + (c.toLowerCase() < 'n' ? 13 : -13))). Python: import codecs; codecs.encode(text, 'rot13').
Breaking ROT13
Brute force: try all 26 shifts, find readable text (seconds). Frequency analysis: count letters (E most common in English → R in ROT13, T → G). Online decoders: instant.
Unicode handling
ROT13 applies to Latin alphabet (A-Z, a-z) only. Chinese, Arabic, emoji, accented letters (é, ñ) unchanged. If need Unicode: use different cipher (XOR, Base64, AES).

Common mistakes to avoid

Using ROT13 for secure encryption (not secure)

Why it happens: ROT13 = trivial to break. Only 26 possible shifts (try all in seconds). Known algorithm (shift 13). Frequency analysis (E → R in English). Anyone can decode (online tools, Python one-liner).

How to avoid it: Use ROT13 only for obfuscation (spoilers, Easter eggs), not security. For encryption: AES, RSA, bcrypt. ROT13 = educational, fun, tradition (not cryptography).

Expecting Unicode (non-Latin) characters to rotate (unchanged)

Why it happens: ROT13 applies to A-Z, a-z only. Chinese (你好), Arabic (مرحبا), emoji (😀), accented letters (é, ñ) unchanged. Only Latin alphabet rotated.

How to avoid it: If need Unicode obfuscation: Base64 (encodes all characters), XOR cipher, AES. ROT13 = Latin alphabet only (A-Z, a-z). Non-Latin: use different tool.

Forgetting ROT13 is reversible (apply once for encode, twice returns original)

Why it happens: ROT13(ROT13(x)) = x (self-inverse). Encoding twice = decoding = original. Confusing if expect separate encrypt/decrypt. Example: Hello → Uryyb → Hello (not double-encrypted).

How to avoid it: Remember: apply once = encode. Apply again = decode (returns original). No separate decrypt algorithm (same as encrypt). 13 + 13 = 26 (full cycle).

Using ROT13 for email obfuscation (spam filters detect)

Why it happens: Spam filters know ROT13 (common obfuscation). Decoding trivial (built-in filter checks). ROT13 email addresses flagged as spam attempt. Ineffective against modern filters.

How to avoid it: Don't use ROT13 for spam (unethical, ineffective). For legitimate email obfuscation (prevent scraping): JavaScript rendering (user@[domain]) or CAPTCHA. ROT13 = not effective.

Assuming ROT13 hides content from search engines (indexed)

Why it happens: Search engines can decode ROT13 (trivial algorithm). Obfuscated text still indexed (converted to plaintext, searchable). Not effective for SEO hiding.

How to avoid it: If hide from search engines: robots.txt (Disallow), noindex meta tag, password protection. ROT13 doesn't prevent indexing (search engines smart).

Frequently asked questions

Is ROT13 secure encryption?

No. ROT13 = obfuscation, not encryption. Trivial to break (26 possible shifts, try all in seconds). Use for spoilers, Easter eggs, learning. For security: AES, RSA, bcrypt.

How do I decode ROT13 text?

Apply ROT13 again (self-inverse). ROT13(ROT13(x)) = x. Use this tool, or Python: codecs.encode(text, 'rot13'). Or try all 26 Caesar shifts (one will be readable).

What is the difference between ROT13 and Caesar cipher?

ROT13 = Caesar cipher with shift 13 (special case). Caesar cipher: shift N (0-25). ROT13: N = 13 (self-inverse: apply twice → original). Other shifts not self-inverse.

Why does Geocaching use ROT13?

Geocaching tradition: ROT13 hints (location clues). Prevents accidental spoiler (solver must decode to read). Easy to decode (not meant to be hard), just courtesy. Opt-in hints.

Can ROT13 handle numbers or special characters?

Numbers, punctuation, spaces unchanged (only A-Z, a-z rotated). Hello123! → Uryyb123!. If need full obfuscation: Base64, XOR, AES (encodes all bytes).

What does 'self-inverse' mean?

Self-inverse: applying operation twice returns original. ROT13(ROT13(x)) = x. Reason: 13 + 13 = 26 (full alphabet). Same algorithm for encode/decode (no separate decrypt).

Is there ROT47 or other ROT variants?

Yes. ROT47: shifts all ASCII printable characters (33-126, not just letters). ROT5: shifts digits (0-9). ROT18 = ROT13 + ROT5 (letters + digits). Less common than ROT13.

References

Privacy and availability

  • Runs entirely in your browser — zero server processing
  • No signup or account required
  • Works offline once loaded
  • Fast, lightweight, no external dependencies
  • Available as a browser extension for Chrome and Firefox