Caesar Cipher

Free Caesar cipher tool. Encrypt and decrypt text with a shift cipher (Caesar cipher), supporting any shift value including ROT13, with case and punctuation preserved.

AI-ready Use this tool with AI

This tool has a free JSON API. Copy a prompt or skill below to use it with ChatGPT, Claude, or any AI agent — no API key needed.

API docs
Enter text and a shift above.

How caesar cipher works

The Caesar cipher is one of the oldest known encryption methods, named after Julius Caesar who used a shift of 3. Each letter in the message is replaced by the letter a fixed number of positions down the alphabet. A shift of 3 turns A into D, B into E, and so on, wrapping around so Z becomes C.

To decrypt, you shift each letter back by the same amount. Because there are 26 letters, a shift of 13 (ROT13) is its own inverse — applying it twice returns the original text, which is why ROT13 is popular for hiding spoilers in plain sight. This tool supports any shift value, positive or negative, and treats decrypt as the reverse shift.

Enter your text, choose a shift, and pick encrypt or decrypt. The tool shifts only letters (both cases preserved) and leaves numbers, punctuation, and other characters untouched. The Caesar cipher is a historical toy and is trivially breakable by brute force or frequency analysis — never use it for real security.

Frequently asked questions

What is a Caesar cipher?
A substitution cipher where each letter is shifted a fixed number of places down the alphabet. With a shift of 3, A becomes D and Z becomes C. Caesar reportedly used a shift of 3, which gives the cipher its name.
What is ROT13?
A Caesar cipher with a shift of 13. Because the alphabet has 26 letters, shifting by 13 twice returns the original text, so the same operation encrypts and decrypts. It is commonly used to hide spoilers online.
How is decryption done?
By shifting each letter back by the same amount used to encrypt. This tool implements decrypt as a shift in the opposite direction, and also accepts negative shifts directly.
Is the Caesar cipher secure?
No. There are only 25 possible shifts, so an attacker can try all of them by hand or computer, and frequency analysis breaks it even without knowing the shift. Use it only for puzzles, games, and learning — never for protecting real data.