ROT47 Encoder & Decoder

Rotates all 94 printable ASCII characters by 47 positions

Ad placeholder (leaderboard)

ROT47 is a rotation cipher that extends the idea of ROT13 to the entire set of printable ASCII characters. Instead of only scrambling the 26 letters, it rotates digits, punctuation and symbols as well, so the output looks far more jumbled. It is popular in puzzle hunts, capture-the-flag challenges and as a stronger-looking spoiler hiding scheme.

How it works

ROT47 operates on the 94 printable ASCII characters from code 33 (!) through 126 (~). For each such character it computes a new code with the formula 33 + ((code - 33 + 47) mod 94). Adding 47 and wrapping inside the 94-character window shifts each character to the one roughly halfway across the printable range. Because 47 is exactly half of 94, applying the rotation a second time adds up to a full 94-step loop and restores the original character. That makes ROT47, like ROT13, its own inverse — one operation both encodes and decodes.

The space character (code 32) sits just below the rotated range and is deliberately left alone, which keeps word boundaries visible. Anything outside the printable ASCII block, including newlines and accented Unicode letters, is also passed through unchanged.

Example

Encoding Gera Tools 2026! produces a string where every visible character has moved. For instance the letter G (code 71) maps to (71 - 33 + 47) mod 94 + 33, which is code 118, the letter v. The space stays a space, so word spacing is preserved while the content is obscured. Running the result through ROT47 again returns Gera Tools 2026! exactly.

Notes

  • ROT47 is a good demonstration of self-inverse ciphers over a larger alphabet than ROT13.
  • It is unkeyed and offers no security — use it for puzzles and obfuscation only.
  • If you want to scramble letters alone, or choose a custom shift, use ROT13 or ROT-N instead.
Ad placeholder (rectangle)