ROT47 Cipher

Reciprocal cipher over the printable ASCII range (33–126).

Open tool

Overview

The ROT47 cipher tool shifts every printable ASCII character by 47 positions within the range ! through ~. Unlike ROT13, which only touches letters, ROT47 scrambles digits, punctuation, and symbols too — making the output look thoroughly garbled while remaining a single keystroke away from the plaintext.

It is a step up from ROT13 for casual obfuscation in forums and code comments, a teaching tool for understanding modular shifts beyond the alphabet, and a frequent appearance in beginner CTF challenges. Like ROT13, it provides zero real security.

How it works

ROT47 operates on the 94 printable ASCII characters with code points 33 (!) through 126 (~). Each character is shifted by 47 within that range: C = ((P - 33 + 47) mod 94) + 33. Because 47 + 47 = 94, applying ROT47 twice returns the original — the cipher is its own inverse, just like ROT13. Characters outside the printable range (space, tab, newline, high-bit bytes) pass through unchanged. The 94-character cycle includes digits, every common punctuation mark, and upper/lower-case letters, so the visible output bears no resemblance to the input.

Examples

Plaintext: Hello, World!
Output:    w6==@[ (@C=5P
Plaintext: w6==@[ (@C=5P
Output:    Hello, World!
Plaintext: ROT47 cipher 2026
Output:    #~%cf 4:A96C a_ae
Plaintext: !"#$%&'()
Output:    PQRSTUVWX

FAQ

Is ROT47 more secure than ROT13?

No, not in any meaningful way. The shift is fixed and trivially reversible. The only thing ROT47 has over ROT13 is that the output looks more obviously encoded, which can actually be a disadvantage for low-key spoiler hiding.

Why exactly 47?

The printable ASCII range is 94 characters long, and 47 is exactly half. A half-range shift is its own inverse — 2 × 47 = 94 ≡ 0 (mod 94) — mirroring ROT13's 2 × 13 = 26 property over the alphabet.

Does it handle Unicode?

No. Unicode characters outside the printable ASCII range (and any control characters) are passed through unchanged. The output remains valid UTF-8 because all transformed characters stay in ASCII.

Where would I use this?

Hiding small spoilers in code or chat, teaching encoding concepts, and producing intentionally light obfuscation. Never for anything sensitive.

Try ROT47 Cipher

An unhandled error has occurred. Reload ×