# Caesar Cipher

Encode, decode, and brute-force the Caesar cipher with any shift (1–25), or print all 25 candidate decodings.

> Canonical page: https://elysiatools.com/en/tools/caesar-cipher

- **Category:** Format Conversion

- **Keywords:** caesar cipher, caesar shift, brute force caesar, caesar cipher decoder, caesar cipher encoder, shift cipher

## Overview

The **Caesar cipher** shifts each letter by a fixed number of places through the alphabet — history's most famous substitution cipher, supposedly used by Julius Caesar with a shift of 3.

**Three modes:**
- **Encode** — shift every letter forward by your chosen amount. With shift 3: `A→D, H→K, Z→C`. Non-letters (spaces, digits, punctuation) are left alone.
- **Decode** — shift every letter *back* by the amount. The reverse of encode.
- **Brute force** — when you have ciphertext but don't know the shift, this tries all 25 possible shifts and shows each candidate, so you can read off the one that's real English. The classic way to break a Caesar cipher in seconds.

**Good to know:**
- The shift wraps around the alphabet (`Z` + 1 → `A`).
- **Preserve case** (default on) keeps uppercase as uppercase and lowercase as lowercase. Turn it off to fold everything to one case — sometimes useful for analyzing ciphertext.
- A shift of 13 is the special case known as **ROT13**; this tool handles arbitrary shifts plus brute force, so it strictly does more than a ROT13-only tool.
- Caesar is trivially breakable and should never be used for real secrecy — it's a teaching tool and a puzzle.

## Inputs

- **Text** (textarea): Enter text to encipher, ciphertext to decipher, or ciphertext to brute-force...
- **Mode** (select)
- **Shift** (number): 1–25
- **Preserve case** (checkbox)

## When to use

- When you need to encrypt a message using a classic Caesar shift or decrypt a known ciphertext with a specific shift value.
- When you encounter an encrypted message with an unknown shift key and want to run a brute-force check to reveal the plaintext.
- When solving geocaching puzzles, cryptography challenges, or educational exercises that involve ROT13 or arbitrary letter-substitution shifts.

## How it works

- Input your text into the input area and select your desired operation mode: Encode, Decode, or Brute force.
- Specify a shift value between 1 and 25 if you are encoding or decoding.
- Choose whether to preserve the original letter casing or fold all characters to a single case.
- View the output instantly, which will display the shifted text or a list of all 25 candidate decodings if brute-forcing.

## Use cases

- Encoding secret clues for escape rooms, treasure hunts, or classroom cryptography lessons.
- Decrypting mystery text in geocaching descriptions that use ROT13 or other shift values.
- Breaking unknown monoalphabetic shift ciphers by scanning the 25 brute-force candidates.

## Frequently asked questions

### What is the Caesar cipher?

It is a substitution cipher where each letter in the plaintext is shifted a fixed number of places down the alphabet.

### Can this tool handle ROT13?

Yes, ROT13 is simply a Caesar cipher with a shift of 13, which you can run by setting the shift value to 13.

### How does the brute-force mode work?

It generates and displays all 25 possible shift combinations, allowing you to easily identify the readable English output.

### Are numbers and punctuation shifted?

No, the tool only shifts alphabetic characters; numbers, spaces, and punctuation remain unchanged.

### Is the Caesar cipher secure for sensitive data?

No, it is highly insecure and easily broken; it should only be used for puzzles, education, and historical interest.

## Related tools

- [Atbash Cipher](https://elysiatools.com/en/tools/atbash-cipher): Encode and decode text using Atbash substitution cipher (reverses the alphabet)
- [Base64 Encoder/Decoder](https://elysiatools.com/en/tools/base64-encoder): Encode and decode Base64 strings
- [Base64URL Encoder/Decoder](https://elysiatools.com/en/tools/base64url-encoder): Encode and decode Base64URL (URL-safe Base64 variant used by JWT/JWS/JWE), with conversions between standard and URL-safe Base64
- [Hex to String Converter](https://elysiatools.com/en/tools/hex-to-string): Convert text to and from hexadecimal strings with flexible spacing, prefix (0x/\x/U+), and case options
- [ROT13 Cipher](https://elysiatools.com/en/tools/rot13-cipher): Encode and decode text using ROT13 substitution cipher (rotates letters by 13 positions)
- [ROT47 Cipher](https://elysiatools.com/en/tools/rot47-cipher): Encode and decode text using ROT47 cipher (rotates all printable ASCII characters by 47 positions)
- [Text to Binary Converter](https://elysiatools.com/en/tools/text-to-binary): Convert text to and from binary bit strings using ASCII (7-bit) or UTF-8 (8-bit) encoding
- [Vigenère Cipher](https://elysiatools.com/en/tools/vigenere-cipher): Encode and decode text using Vigenère cipher with a keyword

## Samples

- [Copyright-Free MP3 Audio Samples](https://elysiatools.com/en/samples/mp3-samples): Collection of royalty-free audio samples for testing and development purposes including nature sounds, meditation music, and ambient audio
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion

## Related content

- [Classical and Modern Cipher Tools](https://elysiatools.com/en/hubs/classical-and-modern-cipher-tools): Practice safe educational and CTF cipher workflows by comparing reversible classical transformations with modern encryption and recording their security limits.
