Skip to content

Caesar Cipher

Adjustable-shift Caesar cipher, encode and decode.

Caesar Cipher shifts each letter of your text by a chosen amount from 0 to 25, entirely in your browser. Named after Julius Caesar, it is one of the oldest known ciphers and a great way to learn substitution-cipher basics—not to protect real secrets.

How it works

Each Latin letter's position in the alphabet is shifted forward (encode) or backward (decode) by the chosen amount, wrapping around after Z back to A. Non-letter characters such as spaces, digits, and punctuation are left untouched.

Benefits

  • Adjustable shift from 0 to 25 for encode and decode
  • Runs entirely client-side with simple arithmetic
  • Clear labeling as a toy cipher, not real encryption
  • Great for teaching substitution ciphers and frequency analysis

Use cases

  • Teach basic cryptography concepts in a classroom setting
  • Build simple puzzles or escape-room style clues
  • Demonstrate brute-force attacks against small keyspaces
  • Practice frequency analysis on shifted English text

Best practices

  • Use the Caesar cipher only for games, puzzles, or teaching—never for real secrets
  • Pick a random shift only for entertainment value, not security
  • Explain to learners why a 26-value keyspace is trivially breakable
  • Combine with other toy ciphers only for layered puzzle design, not real protection

Common mistakes

  • Assuming any shift value provides meaningful security
  • Forgetting that decode requires the exact same shift used to encode
  • Expecting digits or punctuation to be shifted—only letters move
  • Using this for anything beyond puzzles, games, or education

Privacy

The shift transform runs entirely in your browser—no network calls are made and no text is uploaded to ToolHub.

Frequently asked questions

Is the Caesar cipher secure?
No. The Caesar cipher is a toy cipher with only 26 possible shifts, so it can be brute-forced in a fraction of a second or solved with basic frequency analysis. Use it for education and puzzles only, never for real security.
How do I decode a message if I don't know the shift?
Try each shift from 0 to 25, or use frequency analysis—compare how often each letter appears against typical English letter frequencies to guess the shift quickly.
What is the difference between encode and decode here?
Encode shifts letters forward by the chosen amount; decode shifts them backward by the same amount. Encoding with shift N and then decoding with shift N returns the original text.
What happens to spaces, numbers, and punctuation?
Only ASCII letters A–Z and a–z are shifted. Spaces, digits, punctuation, and non-Latin characters are left unchanged.
How is Caesar cipher different from ROT13?
ROT13 is a Caesar cipher with a fixed shift of 13, which makes it its own inverse. This tool lets you pick any shift from 0 to 25, so encode and decode are separate operations unless the shift happens to be 13.
Does this tool send my text anywhere?
No. The shift is computed entirely in your browser with simple character-code arithmetic—no network request is made.

Version 1.0.0 · Updated 2026-07-27 · 30 seconds