Back

Caesar Cipher

Shift letters by a custom offset using the classic Caesar substitution cipher.

100% Client-Side
Khoor Zruog (Hello World)
⚙️ Shift Configurations
Caesar Rotation OffsetROT-3 (Caesar Default)
Rotate Digits (ROT5)Apply modular rotation to numbers 0-9.
💡 Caesar Cipher Facts

Named after Julius Caesar, who used it with a shift of 3 to protect military dispatches. To decrypt, simply rotate in the opposite direction (e.g. shift of 26 minus the original key).

What is Caesar Cipher?

This Caesar cipher tool shifts every letter in your text by a fixed number of positions in the alphabet to encode or decode messages. It's the classic cipher taught in introductory cryptography and computer science courses, and works as both a caesar cipher encoder and caesar cipher decoder. Adjust the shift value to encode text or try all 25 possible shifts to crack an unknown Caesar-encoded message.

How It Works

The tool takes each letter in your input and shifts it forward (or backward, for decoding) through the alphabet by the number of positions you specify, wrapping around from Z back to A as needed; non-letter characters like spaces and punctuation are left unchanged. Because there are only 26 possible shifts, Caesar ciphers are trivially breakable by brute force, which is why they're used for education rather than real security.

Is It Safe to Use?

All shifting happens locally in your browser's JavaScript; your text is never uploaded to a server, so classroom exercises or private notes stay on your device.

How to Use Caesar Cipher (Step-by-Step Guide)

  1. Enter the text you want to encode or decode.
  2. Set the shift value (how many letters to move, 1-25).
  3. Choose encode or decode mode.
  4. The tool instantly shifts every letter accordingly.
  5. Copy the result, or try different shift values to decode unknown ciphertext.

Frequently Asked Questions

What is a Caesar cipher?
It's one of the oldest known ciphers, where every letter in a message is shifted a fixed number of positions through the alphabet — for example, a shift of 3 turns 'A' into 'D'.
Is the Caesar cipher secure?
No, it offers essentially no real security today since there are only 26 possible shifts, making it trivial to break by simply trying every shift value, which is why it's used for education rather than protecting real information.
How do I use this as a caesar cipher decoder when I don't know the shift?
You can try each of the 25 possible shift values in sequence until the output produces readable text — with so few options, this brute-force approach works quickly.
What's the relationship between Caesar cipher and ROT13?
ROT13 is simply a Caesar cipher with a fixed shift of 13, making it its own inverse — applying ROT13 twice returns the original text.
Does this tool preserve spaces and punctuation?
Yes, only letters are shifted; spaces, numbers, and punctuation marks pass through unchanged.
Why is the Caesar cipher still taught in schools?
Its simplicity makes it an ideal first introduction to the concepts of encryption, shifting, and cryptanalysis before moving on to more complex ciphers.
Does case matter when shifting letters?
Typically no, uppercase and lowercase letters are each shifted within their own case so capitalization is preserved in the output.
Can I use a shift cipher online for languages other than English?
This tool is built around the standard 26-letter English alphabet; languages with different alphabets or extra characters may not shift correctly.
Report an issue with this tool