Tool to decode/encode by ROT1. The ROT1 code for Rotation 1 is 1-letter shift cipher in the alphabet, similar to the Caesar code.
ROT1 Cipher - dCode
Tag(s) : Substitution Cipher
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The ROT1 cipher is a substitution cipher based on a shift of one (1) letter in the alphabet. Each letter is therefore replaced by the next (A becomes B, B becomes C, etc.).
This shift is the basis of the Caesar code and its variants, sometimes the shift of 1 is called the Augustan code.
All letters in the plaintext are replaced by those immediately following in the alphabet (A becomes B, B becomes C, etc. and for the last letter Z, the alphabet is considered a loop and the letter following Z is therefore A, the first letter)
Initial alphabet | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
Alphabet shifted by ROT1 | BCDEFGHIJKLMNOPQRSTUVWXYZA |
Example: The message ROTATION is coded SPUBUJPO
ROT1 code only supports letters of the standard Latin alphabet (A-Z, a-z). Special characters and punctuation are ignored. Optionally, digits can also be shifted by 1.
Rot1 decryption is similar to encryption but uses the opposite shift by replacing each letter with the one immediately before in the alphabet (and the letter before A is the letter Z as if the alphabet was a loop).
Alphabet shifted by ROT1 | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
Plain alphabet | ZABCDEFGHIJKLMNOPQRSTUVWXY |
Example: The message BMQIBCFU is decoded ALPHABET
The algorithm for encryption and decryption of ROT1 is: // Pseudo-code
Function encrypt(text) {
alphabet = {A:B, B:C, .., Y:Z, Z:A}
ciphertext = ''
for each character c in text {
ciphertext += alphabet[c]
}
return ciphertext
}
Function decrypt(text) {
alphabet = {A:Z, B:A, C:B, .., Z:Y}
plaintext = ''
for each character c in text {
plaintext += alphabet[c]
}
return plaintext
}
// Python
def rot1(text):
return ''.join(chr(ord(c) + 1) if A <= c <= Y else (A if c == Z else a) for c in text)
dCode retains ownership of the "ROT1 Cipher" source code. Any algorithm for the "ROT1 Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "ROT1 Cipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "ROT1 Cipher" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "ROT1 Cipher" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: ROT1 Cipher on dCode.fr [online website], retrieved on 2025-04-15,