Tool for automatic Shift Cipher that consists in replacing a letter by another one in the alphabet using a shifting system, a basic or complex sequence of numbers.
Shift 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!
Shift cipher is a monoalphabetic substitution technique where each letter of the original message is replaced by another letter, shifted by a fixed number of positions in the alphabet.
This number of positions, expressed as an integer, is called the (shift) key.
The Caesar cipher is the best-known example of a shift cipher, classically illustrated with a key of value 3.
Shift ciphers use an alphabet and a shift key that alters the position of letters within it.
For example, if a letter is located at position $ N $ in the alphabet, applying a shift of $ X $ replaces it with the letter located at position $ N+X $. This is equivalent to using a shifted alphabet as a substitution table.
Example: Take the letter E in position 5 in the alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ, it will be encrypted by a shift of 3 in position 8 or H.
When the new position exceeds the length of the alphabet, restart the alphabet from the beginning, as the alphabet is considered cyclic.
Example: Z shifted by 1 gives A.
Traditional shift ciphers only apply to the 26 letters of the Latin alphabet. Numbers, spaces, or special characters can be excluded from the encryption, left unchanged, or included via an extended alphabet.
It is possible to define different types of shifts, some shifts correspond to known encryption algorithms:
A single shift (all letters are shifted by the same value) is called Caesar Code.
A multiple shift, according to a sequence or a key that is repeated (the letters are shifted from each of the key values), is called Vigenere Cipher.
A mathematical shift, the easier is progressive, shifting the nth letter of the value n is the Trithemius Cipher or if the shift is more complex Affine Cipher or even Hill Cipher.
In addition, each offset can be applied to a single or several letters, to a single or several words, etc.
Decryption requires knowing the shift used and the alphabet.
Take a letter in position N in the alphabet that has been encrypted by a shift of X, it must be shifted by -X to return to its original position N-X.
Example: The letter H in position 8 in the alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ, will be decrypted from a shift of 3 in position 8-3=5 or E.
Example: The word TIJGU is decoded with an offset of 1 as SHIFT
The shift cipher can take a date as key (called date shift cipher), generally in the formats YYYYMMDD is used as it contains a series of 8 digits which can be used as the shift key.
Example: DATECODE encrypted with the date 2020/10/10 or (2,0,2,0,1,0,1,0) becomes FAVEDOEE
dCode retains ownership of the "Shift Cipher" source code. Any algorithm for the "Shift Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Shift 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 "Shift Cipher" or any other element are not public (except explicit open source licence). 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 "Shift Cipher" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
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: Shift Cipher on dCode.fr [online website], retrieved on 2026-02-22,