ROT5 Digit Rotator

Rotate digits 0–4 ↔ 5–9, leave letters unchanged

Free ROT5 digit rotator — shifts the ten decimal digits by five (0↔5, 1↔6, 2↔7, 3↔8, 4↔9) while leaving letters and symbols untouched. The perfect numeric companion to ROT13, all in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How does ROT5 work?

ROT5 adds 5 to each decimal digit modulo 10: 0↔5, 1↔6, 2↔7, 3↔8 and 4↔9. Any character that is not a digit is left completely unchanged.

ROT5 is a tiny substitution cipher for numbers. It rotates each decimal digit by five places, so 0 swaps with 5, 1 with 6, and so on. It is the numeric sibling of the well-known ROT13 letter cipher and is most useful for puzzles, obfuscating order numbers in screenshots, or teaching modular arithmetic. This tool applies ROT5 instantly and leaves all non-digit characters untouched.

How it works

For every character, the tool checks whether it is a digit from 0 to 9. If it is, the new value is (digit + 5) mod 10. That gives the pairs 0↔5, 1↔6, 2↔7, 3↔8 and 4↔9. Any character that is not a digit — a letter, space, or punctuation mark — is copied straight to the output with no change.

Because the rotation amount (5) is exactly half the number of digits (10), ROT5 is a self-inverse operation. Running it twice returns the original text, which is why a single button both encodes and decodes.

The complete digit mapping

OriginalRotated
05
16
27
38
49
50
61
72
83
94

Every digit pairs with the digit exactly five steps away, and every pair is symmetric.

Worked example

The string Order 1234 ships in 7 days becomes Order 6789 ships in 2 days: the digits 1, 2, 3, 4 rotate to 6, 7, 8, 9 and the lone 7 rotates to 2, while every letter and space is preserved.

Running Order 6789 ships in 2 days through ROT5 again gives back the original — the self-inverse property in action.

Practical uses

  • Obfuscating order or invoice numbers in screenshots — the digits look random but the letters around them stay readable, so the context is clear without revealing the actual ID
  • Puzzle hunts — ROT5 is a common encoding in cryptographic puzzles that mix text and numeric clues
  • Teaching modular arithmetic — the (digit + 5) mod 10 formula is one of the simplest real examples of modular arithmetic students encounter
  • Combined with ROT13 — combining ROT5 (digits) and ROT13 (letters) gives ROT18, which scrambles the entire alphanumeric range in one step

ROT5 has no key and a trivially small key space, so it is not encryption — treat it as a puzzle or obfuscation toy. Everything runs locally in your browser; your text is never uploaded.