Caesar Cipher

Encrypt or decrypt text with a customizable Caesar shift — useful for a school cryptography exercise or solving a beginner CTF challenge.

Example:

How it works

The Caesar cipher shifts each letter of the alphabet by a fixed number of positions (the "shift"): with a shift of 3, A becomes D, B becomes E, etc. Upper and lower case are preserved, and non-letter characters (digits, punctuation, spaces) stay unchanged. To decrypt, you simply apply the reverse shift — check "Decrypt" to have the tool do it automatically with the same shift value.

How can I find the shift of an unknown encrypted text?

Since there are only 25 possible shifts, the simplest method for an exercise or a beginner CTF is to try each value from 1 to 25 in "Decrypt" mode until you get readable text. That's precisely this cipher's main weakness: the key space is tiny, so a manual brute-force attack succeeds within a few tries.

What's the difference with ROT13?

ROT13 is a special case of the Caesar cipher with a fixed shift of 13 (half the alphabet), which makes it its own inverse. The general Caesar cipher offered here lets you choose any shift from 1 to 25, which more closely matches the historical presentation of this cipher (attributed to Julius Caesar) and exercises that ask you to work with an arbitrary shift.

Privacy: encryption and decryption run entirely in your browser via WebAssembly — the text entered is never sent to a server.