Skip to main content
CipherChronicle

Cipher methods Substitution

ROT-47

An extended ROT-13 applied to the 94 printable ASCII characters (33–126). A fixed 47-position shift that scrambles letters, digits and symbols together.

Family :
Substitution
Difficulty :
Beginner
Era :
Internet era (1990s)

Also known as : ROT47 · ASCII rotation 47 · extended ROT-13

ROT-47 is the extended cousin of ROT-13: instead of operating only on the 26 letters of the alphabet, it works on the full 94 printable ASCII characters (codes 33 to 126). The shift is fixed at 47, exactly half of 94, which makes the cipher involutive: a single operation both encrypts and decrypts, exactly like ROT-13.

Principle

For each character c whose ASCII code satisfies 33 ≤ code(c) ≤ 126:

code(c') = 33 + ((code(c) − 33 + 47) mod 94)

Characters outside the range (spaces, tabs, control characters) are left untouched. Uppercase, lowercase, digits, punctuation and symbols are all shuffled together within the same 94-character window.

A few mappings

A (65) → r (114)         0 (48) → _ (95)
B (66) → s (115)         @ (64) → q (113)
C (67) → r (114)         ? (63) → p (112)
a (97) → 2 (50)          ! (33) → P (80)
z (122) → K (75)         space → space

Why exactly 47?

The 47-position shift is chosen to:

  • Cover half of the 94 printable characters: involutive → encryption = decryption.
  • Map uppercase into the lowercase range and vice versa — ciphertext ends up looking like “readable noise” that can be shipped through any text channel (email, IRC, chat).
  • Preserve ASCII formatting: newlines, tabs and spaces are left alone, so source code and URLs can be encrypted without losing structure.

Historical use

ROT-47 emerged in 1990s Unix culture, when ROT-13 had become too narrow to hide, on Usenet forums and mailing lists, content beyond plain letters (video-game spoilers, puzzle answers, joke punch-lines). Moving to ROT-47 let users mask digits and punctuation too, which made URLs, email addresses and code snippets effectively unreadable at a glance.

As with ROT-13, the intent was never security: just a light “blanching” that requires a deliberate act to read — copy-paste into a rotation tool or fire up tr in the shell.

echo "Hello world" | tr '!-~' 'P-~!-O'   → ROT-47

Variants

  • ROT-5 — digits 0–9 only.
  • ROT-13 — letters a–z and A–Z only.
  • ROT-18 — ROT-13 combined with ROT-5.
  • ROT-47 — full printable ASCII (33–126).
  • ROT-8000 — Unicode extension covering the bulk of human scripts (plane 0).

All rely on the same involutive principle: shift by half the covered range.

Strengths and weaknesses

Strengths

  • Trivially reversible, no mental math cost.
  • Preserves text structure (line lengths, spacing, JSON/HTML layout if applied to content only).
  • Shipped in every major standard library and text editor (Vim: g?, Emacs: M-x rot13-region).

Weaknesses

  • Zero security: a trained eye identifies ROT-47 within seconds thanks to its character distribution (tilde, braces, pipes disproportionately common).
  • Frequency analysis on printable ASCII recovers an English/French plaintext in seconds of computation.
  • Has absolutely no place in any real confidentiality setting.

In CipherChronicle

ROT-47 is the extended sibling of ROT-13 — same logic, wider character set. Companion grids can mix uppercase, lowercase, digits and punctuation to build puzzles visually richer than pure alphabetic rotations, while staying accessible to a beginner who already grasps ROT-13.

Grid

r
x
!
w
t
#
r
w
#
~
}
x
r
{
t
Q
R
S
T
U
V
W
X
Y
Z
  1. 1

    A mixed ciphertext

    Lowercase letters, punctuation, unusual characters — the visual signature of an ASCII rotation.

  2. 2

    Pattern recognition

    The character set spans printable ASCII (33–126). No uppercase letters survive — ROT-47 moved them.

  3. 3

    Hypothesis: 47-position ASCII rotation

    47 = 94 / 2 → involutive like ROT-13: encrypting and decrypting are the same operation.

  4. 4

    Apply the inverse shift

    Every ASCII character steps back 47 positions (modulo 94), restoring its plaintext value.

  5. 5

    Message revealed

    The original text resurfaces — here, the name of the project.