ConvertAny

Shift Cipher Encoder & Decoder

A shift cipher replaces every English letter with another letter a fixed number of positions away. The shift is the key: encryption adds it and decryption subtracts it, wrapping around the 26-letter alphabet. Choose your own key here, including negative shifts or 13 for ROT13.

Any safe whole number, including negative values. Values wrap modulo 26.

0 / 50,000 characters

Letter mapping · Shift 5

Input alphabetABCDEFGHIJKLMNOPQRSTUVWXYZ
Output alphabetFGHIJKLMNOPQRSTUVWXYZABCDE

Your text is processed in this browser. It is not uploaded or saved by this tool. No account required.

Decode without knowing the shift

Try all 26 possible shifts on your input, including 0 (unchanged). Read the candidates to find meaningful text; this tool does not automatically identify the correct answer.

How to use a custom shift cipher

1

Enter your text

Paste plaintext or a message encoded with a shift cipher.

2

Set the key and operation

Enter a whole-number shift. Encrypt adds the key; decrypt subtracts the same key. Results update instantly.

3

Copy or inspect candidates

Copy or download your result. If the key is unknown, compare all 26 possible decryptions below.

Shift cipher example: key 5 and ROT13

With key 5, HELLO, WORLD! becomes MJQQT, BTWQI!. Decrypt with the same key to restore the original. With key 13, HELLO becomes URYYB; applying ROT13 twice restores HELLO.

Number A–Z from 0 to 25 and normalize the key as k = ((shift mod 26) + 26) mod 26. Encryption is E(x) = (x + k) mod 26; decryption is D(x) = (x − k + 26) mod 26.

Supported text and limits

  • Only A–Z and a–z are shifted; uppercase and lowercase are preserved. Digits, punctuation, spaces, accented letters, Chinese, Cyrillic and emoji stay unchanged.
  • Up to 50,000 characters per input. Use this classical cipher for learning and puzzles; it is easily broken and should not protect sensitive information.

Frequently asked questions

What is a shift cipher?

A shift cipher is a substitution cipher that rotates each letter by the same key. For example, key 5 maps A to F and Z to E. It is also commonly called a Caesar cipher.

How do I decrypt a shift cipher?

Enter the ciphertext, select Decrypt and use the same key used to encrypt. With key 5, MJQQT decrypts to HELLO. If the key is unknown, inspect all 26 candidates.

Can I use negative shifts or keys greater than 26?

Yes. Any safe whole number is accepted and normalized modulo 26. A shift of −1 equals 25, 29 equals 3, and 0 or 26 leaves text unchanged.

Is ROT13 a shift cipher?

Yes. ROT13 is a shift cipher with key 13. Because 13 is half of 26, encryption and decryption are identical; applying it twice restores the original text.

Does it support accented letters and non-English alphabets?

Only A–Z and a–z rotate. Accented letters, Chinese, Cyrillic, numbers, punctuation, whitespace and emoji remain unchanged; letter case is preserved.

Is this shift cipher safe for confidential text?

No. Its 26 possible keys can be tried easily, so use it for exercises or puzzles. The tool itself processes text locally without uploading or saving it, and requires no signup.

More Tools