ROT Encoder/Decoder - ROT13 Cipher
Free online ROT encoder and decoder with ROT13, ROT5, ROT18, ROT47, and Caesar shifts ROT-0 to ROT-25. Brute-force every rotation in one click to crack unknown-shift ciphers for CTF and puzzles.
ROT Encoder/Decoder - ROT-13 and Caesar Cipher Online
A free online ROT encoder and decoder tool that supports ROT-0 through ROT-25. Apply the classic ROT-13 cipher or any Caesar cipher shift to encode text, or decode ROT-encrypted messages. Simple letter substitution cipher commonly used in puzzles, CTF challenges, and basic cryptography education.
How do I decode a Caesar cipher when I don't know the shift?
Use the Brute Force mode in this tool. Paste your ciphertext, switch the mode selector to 'Brute Force', and click Process — it instantly outputs all 25 letter rotations as a numbered 'ROT-N:' list. Scan the list for the line that reads as plain English (or your target language) and you have both the plaintext and the original shift in one click, with no guessing or re-running. This is the standard workflow in CTF competitions, forensics, and puzzle solving where the key is unknown. For ROT47 ciphers, select the ROT47 variant first and Brute Force will instead enumerate all 93 ASCII rotations. Frequency analysis can also pinpoint the shift on longer text (E, T, A stay most common, just shifted), but for short strings eyeballing the 25 rotations is fastest. Pipeline users: every candidate is on its own line, so you can copy the block and grep for dictionary words programmatically.
What text does the tool preserve, and how does it handle case, whitespace, and Unicode?
The transformation is deterministic and lossless for everything outside the active alphabet. Letters mode (ROT-0 to ROT-25) rotates only A-Z and a-z, preserving case exactly (uppercase stays uppercase), and passes digits, punctuation, whitespace, newlines, and any non-ASCII/Unicode characters through byte-for-byte unchanged. ROT5 touches only digits 0-9 and leaves letters and everything else intact. ROT18 applies ROT13 to letters and ROT5 to digits in a single pass. ROT47 rotates the full printable ASCII range 0x21 ('!') through 0x7E ('~') — including digits and punctuation — but leaves spaces, tabs, newlines, and characters outside that range untouched. Leading and trailing whitespace in your input is kept in the output (only the emptiness check trims, so a blank/whitespace-only input is rejected). Processing is 100% client-side, so the same input always yields the same output, making the tool safe to script around in automated pipelines.
What is ROT13 and how does it work?
ROT13 is a Caesar cipher that shifts each letter 13 positions through the 26-letter English alphabet — A becomes N, B becomes O, M becomes Z, N becomes A, and so on. Because 13 is exactly half of 26, applying ROT13 twice returns the original text, making encoding and decoding the same operation. It originated on Usenet in the 1980s as a way to obscure spoilers, jokes, or adult content rather than provide real security. ROT13 is documented informally in RFC 3251 (joke) and widely supported in Unix tools (`tr a-zA-Z n-za-mN-ZA-M`). Letters keep their case; digits, punctuation, and Unicode characters pass through unchanged.
Is ROT13 actually secure?
No — ROT13 provides essentially zero cryptographic security. Any attacker can decode it instantly by either applying ROT13 again, running `tr` on a Unix shell, or recognizing the characteristic 'looks like English with shifted letters' pattern. Frequency analysis breaks any Caesar cipher in seconds because the letter distribution of the ciphertext matches the plaintext exactly (just shifted). OWASP and the NSA explicitly classify Caesar-family ciphers as historical curiosities, not security mechanisms. Use ROT13 only for casual obfuscation (spoilers, jokes), never for passwords, secrets, or sensitive data — use AES-256-GCM with a properly derived key for real protection.
What are ROT5, ROT18, and ROT47?
ROT5 shifts digits 0-9 by 5 positions (5 ↔ 0, 6 ↔ 1, etc.) — useful for hiding numbers in combination with ROT13. ROT18 combines ROT13 for letters with ROT5 for digits in a single pass, often used on Usenet for obscuring phone numbers, dates, and scores along with text. ROT47 expands the alphabet to all 94 printable ASCII characters (0x21 '!' through 0x7E '~') shifted by 47 positions — punctuation and symbols cycle too. ROT47 is symmetric like ROT13. None offer security; all are reversible by knowing the algorithm. They are interesting as exercises in modular arithmetic over different alphabet sets.

How do I implement ROT13 in Python or JavaScript?
Python: `import codecs; codecs.encode('Hello', 'rot_13')` returns 'Uryyb'. Or manually: `''.join(chr((ord(c) - 65 + 13) % 26 + 65) if c.isupper() else chr((ord(c) - 97 + 13) % 26 + 97) if c.islower() else c for c in text)`. JavaScript: `text.replace(/[a-zA-Z]/g, c => String.fromCharCode((c.charCodeAt(0) & 32) | ((c.toUpperCase().charCodeAt(0) - 65 + 13) % 26 + 65)))`. The key is modular arithmetic — shift 13, modulo 26, add base 65 (uppercase A) or 97 (lowercase a). Most languages have built-in ROT13: Perl's `tr/A-Za-z/N-ZA-Mn-za-m/`, Ruby's `String#tr`, and OpenBSD's `caesar` command.
Can ROT cipher handle non-English alphabets?
Standard ROT13 only handles the basic 26-letter English alphabet. Languages with diacritics (Spanish ñ, French é, German ä), or non-Latin scripts (Cyrillic, Arabic, Chinese), require alphabet-specific variants. ROT13 implementations either pass non-ASCII characters through unchanged (most common) or extend the alphabet to include Latin-1 characters with a different rotation amount. Cyrillic has its own ROT15 (half of 30 letters), and Greek has ROT12 (half of 24 letters). For Unicode in general, no standard ROT variant exists; you would need to define the character set and rotation amount explicitly. Modern protocols use Unicode normalization and proper encryption instead of letter-shift ciphers.
How is ROT13 used in CTF challenges and puzzles?
Capture-the-Flag (CTF) competitions and crypto puzzle sites (CryptoHack, picoCTF) use ROT13 and Caesar variants as warm-up challenges. Recognize them by: high digram frequency matching English (e.g., 'gur' is ROT13 of 'the'), letter frequency distribution still skewed (E, T, A still common but shifted), and word lengths matching natural English. Tools like CyberChef's 'ROT13' and 'Caesar Cipher' bricks decode in one click. Brute-force all 26 rotations and grep for English words to identify the key. Real CTF crypto challenges quickly move on to AES, RSA, ECC, and side-channel attacks; ROT is just the appetizer.
What's the difference between ROT13 and a general Caesar cipher?
ROT13 is the specific Caesar cipher with shift = 13. General Caesar uses any shift 1-25 (shift 0 and 26 are identity). Julius Caesar himself reportedly used shift 3 to encrypt military messages around 50 BC, where A becomes D, B becomes E. The cipher is named after him by historians like Suetonius. Any Caesar cipher is broken in at most 25 trials by an attacker, and frequency analysis identifies the correct shift in one pass on text longer than about 20 characters. ROT13's only advantage over arbitrary Caesar is self-inverse symmetry, making it convenient for casual use without needing to remember 'encode' versus 'decode'.
Are there modern uses for ROT13 in software?
Yes — limited but legitimate: hiding spoilers in plain-text forums, obfuscating Easter eggs or test data so it doesn't show in grep searches, protecting trivial puzzles in educational software, and as the canonical example in cryptography teaching. Vim has `:%!tr A-Za-z N-ZA-Mn-za-m` and Emacs has `M-x rot13-mode` built in. Some email signature generators use ROT13 to hide email addresses from primitive spam crawlers (modern crawlers detect this easily). Source-code distributions occasionally ROT13 specific identifiers to discourage casual copying. Never use it for actual security — TLS 1.3, AES-256-GCM, and modern KDFs (Argon2id, scrypt) are the right tools.
Key Features
- Encode text with ROT cipher instantly
- Decode ROT-encrypted text
- Support for ROT-0 through ROT-25
- ROT-13 classic cipher included
- Preserves non-alphabetic characters
- Case-sensitive transformation
- Swap between encode and decode modes
- Copy results to clipboard
- Dark mode support
- 100% client-side processing
- Works offline
- No registration required
