b2KIT

Caesar Cipher with Brute-Force

Encrypt and decrypt with Caesar shift cipher. Includes brute-force attack showing all 26 rotations simultaneously.

Tested tool guide Tested browser tools Checked August 15, 2026

What Caesar Cipher with Brute-Force does, with a checked example

This tool shifts each letter of the alphabet by a fixed number of positions, wrapping from Z back to A, to encrypt or decrypt text with the classical Caesar cipher. Enter text and a shift value (0-25) to transform it directly, or paste ciphertext with an unknown shift and use brute-force mode, which lists all 26 possible rotations side by side so you can spot the one that reads as plain English. The detail people miss: a shift of 13 is ROT13, and a shift of 0 or 26 returns the original text unchanged.

Worked example

A concrete input and expected output from the current implementation.

Input

Plaintext: HELLO, shift: 3, mode: encrypt

Expected output

KHOOR

Each letter moves 3 positions forward in the alphabet: H to K, E to H, L to O (twice), and O to R, wrapping past Z if needed.

How the result is produced

1

Alphabetic shift with wraparound

Each letter's position in the alphabet (A-Z or a-z) is shifted by the chosen amount using modulo-26 arithmetic, so shifting past Z wraps around to A. Non-letter characters such as spaces, digits, and punctuation pass through unchanged, and the original uppercase or lowercase case of each letter is preserved after the shift.

2

Brute-force rotation table

In brute-force mode the tool applies every possible shift from 1 through 25 (plus the unshifted original) to the input text and lists all resulting strings together. Because a Caesar cipher only has 26 possible keys, this exhausts the entire keyspace instantly, letting you scan the list for the row that forms recognizable words.

Good uses

  • Recovering the plaintext of a Caesar-shifted message from a puzzle or CTF challenge when the shift value isn't given
  • Encrypting a short phrase with a chosen shift for a classroom cryptography demonstration or worksheet
  • Checking whether a piece of text is ROT13 by comparing it against the shift-13 row of the brute-force output

Limits and checks

  • Brute-force scanning depends on the plaintext being recognizable English; very short ciphertexts of a few characters can look plausible under more than one shift.
  • The cipher only transforms Latin letters - digits, punctuation, and non-Latin characters are left as-is, so text mixed with those isn't fully obscured by encryption.
  • A Caesar cipher provides no real security: with only 25 non-trivial shifts, anyone can brute-force it by hand, so it should be treated as a puzzle or teaching tool, not a way to protect sensitive data.

Common questions

Does the shift wrap correctly at the ends of the alphabet?

Yes. Shifting Z forward wraps around to A (and lowercase z wraps to a), and shifting A backward wraps to Z, so the alphabet behaves as a closed 26-letter loop regardless of the shift size or direction you enter.

Can this tool decrypt a message if I don't know the shift that was used?

Yes - that is what brute-force mode is for. It generates all 26 possible rotations of the pasted ciphertext at once, so you read down the list and pick out whichever row forms real words instead of guessing shifts one at a time.

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