ASCII Shift Cipher Encoder & Decoder

Shift every byte by N in the ASCII table (all 256 values)

Ad placeholder (leaderboard)

The ASCII shift cipher is the byte-level generalisation of the classic Caesar cipher. Instead of rotating only the 26 letters of the alphabet, it adds a constant N to the numeric value of every byte, wrapping around modulo 256. That means it works on letters, digits, punctuation, whitespace and even the individual bytes of multi-byte UTF-8 characters.

How it works

The text is first encoded to UTF-8 bytes. Each byte b is then transformed:

encrypt: b' = (b + N) mod 256
decrypt: b' = (b - N) mod 256

Because the byte range is 0–255, adding N can push a value past 255, in which case it wraps around — 250 + 10 becomes 4. Decryption subtracts the same N and the modular wrap exactly undoes the encryption, recovering every original byte.

Since a shifted byte frequently is not a printable character (or not a valid start of a UTF-8 sequence), the tool shows the result as hex bytes by default, and additionally as text whenever the shifted bytes happen to form valid UTF-8.

Example

Shifting Gera Tools by N = 13 gives the bytes:

54 72 7f 6e 2d 61 7c 7c 79 80

Notice that space (0x20) became 0x2d (a hyphen) and the final s (0x73) wrapped to 0x80, which is not printable on its own. Decrypting these bytes with N = 13 subtracts 13 from each and returns Gera Tools.

Notes

  • Any whole number works as the shift; it is reduced modulo 256, so a shift of 256 is the same as 0 and 269 is the same as 13.
  • Paste hex back into the tool in decrypt mode to recover the original text exactly, even when the encrypted bytes were not printable.
  • This is an obfuscation/encoding toy, not encryption — there are only 256 keys and the byte statistics survive the shift.
Ad placeholder (rectangle)