Text & Writing

Caesar Cipher Encoder & Decoder

Experiment with a letter-shift cipher and see exactly how the alphabet changes. Pick a whole-number shift, encode forward or decode backward, and compare all rotations for a short puzzle message.

Free online tool

Loading tool…

Alphabet mapping · normalized shift 3

A → DB → EC → FD → GE → HF → IG → JH → KI → LJ → MK → NL → OM → PN → QO → RP → SQ → TR → US → VT → WU → XV → YW → ZX → AY → BZ → C

Only Latin A–Z and a–z rotate; case and all other characters are preserved. Negative and large safe-integer shifts wrap modulo 26. This historical cipher is educational obfuscation, not secure encryption. Input limit: 250,000 UTF-16 code units.

Conversions run locally in your browser. This tool does not upload input or save it to browser storage.

GET STARTED

How to use the Caesar Cipher Encoder & Decoder

  1. 01

    Paste a message and enter a whole-number shift. Negative shifts are accepted.

  2. 02

    Choose encode to move forward or decode to move backward.

  3. 03

    Inspect the alphabet mapping. For short text, show all 26 backward shifts and choose a candidate.

  4. 04

    Copy or download the result. Reverse the direction with the same shift to restore the starting message.

Examples

Shift three

With shift 3, Attack at dawn! becomes Dwwdfn dw gdzq! Decoding backward by 3 restores the message.

Wrap around the alphabet

Zebra with shift 1 becomes Afcsb. A shift of 27 has the same effect because 27 modulo 26 is 1.

The modulo-26 rule

Number A through Z from 0 to 25. Encoding computes (letter index + shift) modulo 26; decoding subtracts the shift. Uppercase and lowercase letters keep their case. Numbers, punctuation, whitespace, emoji, and accented letters do not move.

Compare candidates without guessing

There are only 26 distinct rotations, including shift zero. The candidate table shows each backward shift for input up to 2,000 UTF-16 code units. Choosing a row sets that shift and decode direction, while keeping the original input available.

An exercise in substitution, not protection

A Caesar cipher exposes letter patterns and has a tiny search space. It is useful for classroom exercises and simple puzzles. It is not a secure way to encrypt modern messages or store private information.

What to know

  • 250,000 UTF-16 code units for the main conversion; candidate table limited to 2,000.
  • Only ASCII Latin letters rotate. All shifts are reversible obfuscation, not secure encryption.

Common questions

Can I use a negative shift?

Yes. Shifts wrap modulo 26. For example, -1 normalizes to 25; encoding moves A to Z. Blank, fractional, and unsafe-integer shifts are rejected.

What happens with a shift of zero or 26?

Both produce the same text. Moving around a 26-letter alphabet by an exact multiple of 26 returns each letter to itself.

How does ROT13 relate to this tool?

ROT13 is the special case with shift 13. Forward and backward shifts of 13 are identical on a 26-letter alphabet.