b2KIT

Caesar Cipher Tool

Encrypt and decrypt text using the Caesar cipher with shift selection and brute-force decryption display.

Tested tool guide Tested browser tools Checked August 16, 2026

What Caesar Cipher Tool does, with a checked example

A Caesar cipher replaces every letter with the letter a fixed number of positions further along the alphabet, so with shift 3, HELLO becomes KHOOR. This tool applies that shift in either direction and, when you do not know the shift, displays all 26 possible decryptions side by side for you to pick the readable one. The surprise for most first-time users is that this cipher is not any kind of security: with only 25 nontrivial shifts, every Caesar message is trivially recoverable, and the brute-force view makes that visible in one glance.

Worked example

A concrete input and expected output from the current implementation.

Input

HELLO WORLD, shift 3, Encrypt

Expected output

KHOOR ZRUOG

Each letter advances three places and wraps past Z, so H becomes K, E becomes H, L becomes O, O becomes R, W becomes Z, and D becomes G; spaces pass through unchanged. Decrypting with shift 3, or the shift-3 row of the brute-force table, restores HELLO WORLD.

How the result is produced

1

Shifting and wrapping

Encrypting adds the shift to each letter's position in the alphabet (A = 0 through Z = 25), and any total past 25 wraps around to the start, so with shift 3 the letter Z becomes C. Decrypting subtracts instead. Letters keep their case, digits and punctuation pass through untouched, and only a-z letters move.

2

Brute force

Brute-force mode runs the text through every shift from 1 to 25 (plus shift 0, the unchanged original) and lays the results out as a table, so one row is always the real message. That row stands out by eye because a real sentence reads naturally while the other 25 rows are usually gibberish. Longer, phrase-like messages make the readable row unmistakable.

Good uses

  • Cracking a friend's or puzzle's shifted message: paste the ciphertext into brute-force mode and scan the rows for the one that reads as real English, which also tells you the shift.
  • Classroom or demo use: encrypt a word, move the shift up and down, and show that 26 shifts exhaust the entire cipher, or use shift 13 (ROT13) to hide an answer that anyone reveals by running it through the same setting again.
  • A quick deterrent against casual onlookers: a shifted line of text on a screen does not instantly read to someone glancing over a shoulder. It is obfuscation only, so treat it as such and never as encryption for anything sensitive.

Limits and checks

  • Only letters move. Digits, punctuation, and spaces stay exactly where they are, so a code that is mostly numbers is barely changed, and every brute-force row shows those characters identically. Do not read a mostly-unchanged result as a failed encryption.
  • Short texts decrypt ambiguously. A single ciphertext letter yields "a" under one shift and "i" under another, both real words, and short fragments often produce several plausible rows. The brute-force table is decisive only for longer, phrase-like text; treat single-word results as candidates, not answers.
  • Direction is easy to invert by accident. Encrypting with shift 3 produces exactly what decrypting with shift 23 does, because 23 is -3 mod 26, and running ROT13 twice returns the original text. If the output looks unchanged, check for a shift of 0 or 26 before assuming the tool failed.

Common questions

Is the Caesar cipher actually secure for hiding anything?

No. With only 25 possible shifts, trying every shift takes seconds and the table always contains the real message. There is no key in the modern sense: anyone who knows the method can read the text, and brute-force mode exists precisely because of that. Use it for puzzles, teaching, or casual obfuscation, never for anything that should stay private.

Why is shift 13 special?

Shift 13 is ROT13. Because the alphabet has 26 letters, shifting by 13 pairs each letter with the one halfway round: A pairs with N, B with O, and so on. Applying it twice returns the original text, which makes it handy for hiding spoilers or puzzle answers: the reader just runs the same shift again, with no direction to remember.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools