Crypto & Security

Caesar Cipher

Encode and decode text with a classic Caesar shift cipher, choosing custom shifts and direction.

Run tool

The Caesar cipher tool transforms ordinary text by shifting alphabetic letters along the alphabet by a set number of positions. In encryption mode, each letter moves forward by your chosen shift value. For instance, with a standard shift of 3, the letter A becomes D, B becomes E, and the word Hello converts to Khoor. When you switch the mode to decrypt, the shift runs in reverse to restore the original message. The tool preserves both uppercase and lowercase letter casing throughout the transformation, shifting capital letters within the uppercase range and small letters within the lowercase range. Non-alphabetic characters, such as numbers, spaces, and punctuation marks, remain unchanged in their original positions. If you leave the input field empty, the tool outputs an empty result without applying a shift. This utility works well for learning classical substitution ciphers, solving puzzle challenges, and encoding simple notes.

Instructions

  1. Enter or paste the text you want to transform into the input box.
  2. Enter an integer shift value, or keep the default shift of 3.
  3. Select whether to encrypt or decrypt your message.
  4. Click Run to view the transformed text in the output area.

Examples

  • Encrypting the phrase 'Hello, World!' with a shift of 3 produces 'Khoor, Zruog!'.
  • Decrypting the ciphertext 'Khoor, Zruog!' with a shift of 3 restores 'Hello, World!'.

FAQ

How does the Caesar cipher handle numbers and punctuation?

The cipher leaves non-alphabetic characters, including numbers, spaces, and punctuation symbols, completely untouched.

What happens if I do not enter any text?

The tool completes the run without an error and returns an empty text output.

Does the shift preserve capital letters?

Yes. Uppercase letters shift to uppercase positions, and lowercase letters shift to lowercase positions independently.

Is the Caesar cipher suitable for securing sensitive information?

No. The Caesar cipher is a basic historical substitution technique meant for educational use and simple puzzles, not modern data protection.

Embed this tool

Add this working SmartPlusLab tool to your website with the code below.