ROT5 Encoder & Decoder

Rotate digits 0-9 by 5 positions — the numeric counterpart to ROT13 for letters. ROT5 is self-inverse: encoding and decoding are the same operation.

"12345""67890"(ROT5)
ROT5
Shift 5
numbers
Numbers only (0-9)

ROT5 Conversion Reference

Numbers (0-9)

0 1 2 3 4 5 6 7 8 9
5 6 7 8 9 0 1 2 3 4

Examples

HELLOHELLO
1234567890
Note: Only digits 0-9 are converted

How ROT5 Works

ROT5 applies a simple substitution to the 10 decimal digits (0-9). Each digit is replaced by the digit 5 positions ahead, with wrapping: 0→5, 1→6, 2→7, 3→8, 4→9, 5→0, 6→1, 7→2, 8→3, 9→4. The formula is: new_digit = (digit + 5) % 10. Because 5 is exactly half of 10, the cipher is self-inverse — applying ROT5 to '67890' returns '12345'. Letters, spaces, and other characters are left unchanged.

ROT5 Combined with ROT13: ROT18

ROT5 is most commonly used alongside ROT13 in a combination called ROT18. ROT18 applies ROT13 to letters and ROT5 to digits simultaneously, obfuscating both alphabetic and numeric content in a single pass. For example, 'Test123' becomes 'Grfg678' under ROT18. The name ROT18 comes from 13 + 5 = 18, though this is informal — it is not a single rotation of 18. ROT18 is useful when you need to obscure alphanumeric strings like serial numbers, codes, or identifiers.

Use Cases for ROT5

ROT5 is used to lightly obfuscate numeric data such as phone numbers, ZIP codes, account numbers, or test data in documentation. Developers sometimes apply ROT5 to numeric portions of configuration files or log data to prevent casual reading. In CTF cybersecurity competitions, ROT5 frequently appears as part of multi-layer encoding challenges. Like all ROT variants, ROT5 provides no real security — it simply makes numbers not immediately recognizable at a glance.

ROT5 Conversion Table

The complete ROT5 mapping is straightforward: 0↔5, 1↔6, 2↔7, 3↔8, 4↔9. Each pair is its own inverse. A phone number like 555-0123 becomes 000-5678 under ROT5. A date like 2024 becomes 7579. The simplicity of the mapping makes ROT5 easy to apply mentally — just add or subtract 5 from each digit, wrapping at 10.

Frequently Asked Questions About ROT5

What does ROT5 stand for?

ROT5 stands for 'rotate by 5.' It shifts each digit forward by 5 positions in the 0-9 range. The naming convention follows ROT13 (rotate letters by 13) — ROT5 is the numeric equivalent.

Does ROT5 affect letters?

No. ROT5 only operates on the digits 0-9. Letters, spaces, punctuation, and all other characters pass through unchanged. To encrypt both letters and numbers, use ROT18 (ROT13 for letters + ROT5 for digits).

Is ROT5 the same as ROT13 for numbers?

Conceptually yes. ROT13 rotates 26 letters by 13 (half), and ROT5 rotates 10 digits by 5 (half). Both are self-inverse for the same reason: shifting by half the alphabet size means applying the operation twice returns to the start.