PK Systems PK Systems
Text tools

ROT13, ROT5, ROT47 & Caesar Cipher

Apply the classic letter-shift ciphers — ROT13, ROT5 for digits, ROT18, ROT47, or any custom Caesar shift — instantly.

ROT13, ROT5, ROT47 & Caesar Cipher

Output

What is ROT13?

ROT13 is a simple letter-substitution cipher that shifts every letter by 13 places — A becomes N, B becomes O, and so on. Because the Latin alphabet has 26 letters, applying ROT13 twice gets you back the original text, which is what makes it the classic spoiler-text cipher of forums and Usenet. It is not encryption — anyone who knows the trick (or sees the suspicious-looking output) can decode it instantly. Use it for hiding spoilers, mild obfuscation, or as a teaching example for substitution ciphers.

How to use the cipher tool

Pick a mode — ROT13 for letters only, ROT5 for digits only, ROT18 for both (ROT13+ROT5), ROT47 for printable ASCII, or Caesar with any custom shift from 1 to 25. Paste your text into the input field. The output updates as you type. To decode, paste the ciphertext and apply the same mode again (ROT13/5/18/47 are self-inverse). For Caesar with a custom shift, decode by re-applying with shift = 26 minus the original.

How each mode works

ROT13: each letter is shifted 13 places (mod 26), case-preserved. ROT5: each digit 0-9 is shifted 5 places (mod 10). ROT18: ROT13 on letters and ROT5 on digits, applied together. ROT47: every printable ASCII character (codes 33-126) is shifted 47 places (mod 94), so punctuation also rotates — and ROT47 is its own inverse like the others. Caesar: same as ROT13 but with any shift you choose; only ROT13 (shift=13) is self-inverse — for other shifts, decode with 26 − shift.

Mode reference

Mode What it shifts Example
ROT13Letters A-Z and a-z (case preserved). Self-inverse.HelloUryyb
ROT5Digits 0-9 only. Self-inverse.1234567890
ROT18Letters and digits, combined. Self-inverse.Code 42Pbqr 97
ROT47Every printable ASCII character (33-126), including punctuation. Self-inverse.Hello!w6==@P
Caesar (custom shift)Letters only, shifted by your chosen amount (1-25).abc + 3 → def

Frequently asked questions

Is ROT13 secure?
No, not in any modern sense. It's a fixed substitution that anyone can undo by hand. ROT13 was always intended as a way to obscure text from casual viewing — spoiler tags, joke punchlines, mild content warnings — not as a cipher. For real privacy, use end-to-end encryption (Signal, age, GnuPG).
Why is ROT13 self-inverse?
Because the Latin alphabet has 26 letters and 13 + 13 = 26. Shifting by 13 twice brings you back to the start. Any cipher that shifts by exactly half the alphabet has this property, which is why ROT13 became the standard rather than ROT12 or ROT14.
What's the difference between ROT13 and ROT47?
ROT13 only touches letters; numbers and punctuation pass through unchanged. ROT47 rotates every printable ASCII character (codes 33-126) by 47 places, so digits and punctuation also get scrambled — the output looks much less recognisable, while still being self-inverse.
How do I decode a Caesar cipher with a custom shift?
Apply Caesar again with the complementary shift: if you encoded with shift 7, decode with shift 19 (since 7 + 19 = 26). The exception is shift 13, which is self-inverse — that's just ROT13. Use the Use as input button to push the output back into the input quickly.
What about non-Latin alphabets?
ROT13, ROT5 and Caesar only touch ASCII letters and digits. Cyrillic, Greek, CJK, and accented Latin characters pass through unchanged. ROT47 covers a wider range (printable ASCII), but still doesn't rotate non-ASCII characters. So the cipher is most useful with English-style text.
Does this run on a server?
No. The transformation is a pure JavaScript loop running in your browser, so private text — even plaintext that you wouldn't normally upload — never leaves your device. Open DevTools > Network and confirm: typing fires zero requests.