How ROT18 Works
ROT18 processes each character independently: if the character is a letter (A-Z or a-z), it applies ROT13 — shifting by 13 positions within the 26-letter alphabet. If the character is a digit (0-9), it applies ROT5 — shifting by 5 positions within the 10-digit range. All other characters (spaces, punctuation, symbols) pass through unchanged. For example, 'Order #4829' becomes 'Beqre #9374'. The letter portions use standard ROT13, and the digit portions use standard ROT5, applied in the same pass.
Why ROT18 Exists
ROT13 has a well-known limitation: it only obfuscates letters, leaving numbers fully readable. This means a ROT13-encoded message like 'Call 555-0123' becomes 'Pnyy 555-0123' — the phone number is completely exposed. ROT18 was created to address this gap by adding ROT5 for digits. The name '18' is informal (13 + 5 = 18), but it stuck in the developer community. ROT18 is particularly useful when obfuscating strings that contain both text and numbers, such as license keys, reference codes, addresses, or technical identifiers.
ROT18 in Practice
ROT18 appears most frequently in software development contexts: obfuscating test data in documentation, hiding example credentials in code comments, masking sample data in bug reports, and as a layer in CTF (Capture the Flag) cybersecurity challenges. Some email obfuscation tools use ROT18 to encode addresses that contain digits (like 'user123@example.com' becoming 'hfre678@rknzcyr.pbz'). As with all ROT variants, ROT18 provides no real security — it is solely for casual obfuscation.
ROT18 vs ROT47: Which to Choose?
Both ROT18 and ROT47 encrypt letters and numbers, but they differ in scope and approach. ROT18 applies separate, well-known transformations (ROT13 + ROT5) and leaves punctuation unchanged — the output remains somewhat readable. ROT47 applies a single transformation to all 94 printable ASCII characters including symbols — the output looks like garbled noise. Choose ROT18 when you want the structure of the text to remain visible (word boundaries, punctuation). Choose ROT47 when you want complete obfuscation of all printable characters.