Caesar Cipher
Encrypt text with a custom Caesar shift cipher or decrypt unknown messages instantly.
Updated
What is the Caesar Cipher?
The Caesar Cipher Tool is a fast and versatile utility for encrypting and decrypting text using one of the oldest and most famous cryptographic algorithms in history. Named after Julius Caesar, who used it to protect his military correspondence, this substitution cipher shifts each letter in your message by a fixed number of positions down the alphabet.
Whether you are studying classical cryptography, solving geocaching puzzles, creating escape room clues, or just sending secret messages to friends, this tool gives you complete control. You can specify custom shift values, toggle between encryption and decryption modes, choose how to handle uppercase/lowercase letters, and decide whether to include numeric digits.
For puzzle solvers, the tool features an integrated Brute-Force Solver. If you have an encrypted message but don't know the key, the solver automatically tests all 26 possible alphabetical shifts and uses statistical frequency analysis (Chi-Square) to instantly identify the most likely original message.
How it works
The Caesar Cipher is a type of substitution cipher where each letter in the plaintext is replaced by a letter a fixed number of positions down the alphabet. For example, with a shift of 1, A would be replaced by B, B would become C, and so on. The alphabet wraps around, so a shift of 1 on Z results in A.
Mathematical Representation
The encryption algorithm can be expressed using modular arithmetic. If we assign each letter a number (A=0, B=1, ..., Z=25), the encryption of a letter with a shift is:
To decrypt a ciphertext letter, the formula is simply reversed:
How This Tool Processes Text
- Character Evaluation: The tool reads your input character by character.
- Shift Application: For every standard letter (A-Z or a-z), it applies your chosen shift value. The shift wraps around the 26-letter alphabet seamlessly.
- Configuration Filters: Depending on your settings, the tool can independently shift numbers (0-9) using modulo 10 arithmetic, and it can either preserve or strip out foreign characters, punctuation, and spaces.
- Brute-Force Analysis (Optional): When using the solver mode, the tool generates all 26 possible permutations. It then compares the letter frequencies of each result against standard English language distributions. The result with the lowest variance (best fit) is highlighted as the most probable plaintext.
Examples
Encrypt with Shift 3
The standard Caesar shift used by Julius Caesar, shifting every letter forward by 3 positions.
Decrypt with Shift 5
Decoding a message that was originally encrypted with a shift of 5.
Frequently asked questions
What is a Caesar cipher?
What is a Caesar cipher?
A Caesar cipher is one of the simplest and most widely known encryption techniques. It is a substitution cipher in which each letter in the original text is replaced by a letter a fixed number of positions down the alphabet. For example, with a shift of 3, A is replaced by D, B by E, and so on.
How secure is the Caesar cipher?
How secure is the Caesar cipher?
The Caesar cipher offers almost zero security by modern standards. Because there are only 25 possible shifts in the English alphabet, an encrypted message can easily be cracked by testing every possibility (brute-forcing) or by analyzing the frequency of the letters. It is mostly used today for educational purposes, puzzles, and children's toys.
What is the ROT13 cipher?
What is the ROT13 cipher?
ROT13 (rotate by 13 places) is a specific, widely used variation of the Caesar cipher with a shift of 13. Because the English alphabet has 26 letters, shifting by 13 twice returns the text to its original state. This means the exact same algorithm is used for both encrypting and decrypting.
Can this tool solve a Caesar cipher if I don't know the shift key?
Can this tool solve a Caesar cipher if I don't know the shift key?
Yes! Our tool includes a Brute-Force Solver mode. If you paste an encrypted message into the solver, it will instantly generate all 26 possible shifts. It also uses algorithmic language analysis to automatically highlight the output that most closely resembles standard English, saving you the trouble of reading every line.
Does the Caesar cipher encrypt numbers and punctuation?
Does the Caesar cipher encrypt numbers and punctuation?
Traditionally, the Caesar cipher only affects the 26 letters of the alphabet, leaving spaces, punctuation, and numbers unchanged. However, our interactive tool includes advanced configuration options that allow you to shift numerical digits or strip out punctuation entirely if you want a continuous string of encrypted text.
Related tools
More utilities you might find handy.
Atbash Cipher
Encode and decode text using the Atbash cipher.
One-Time Pad Generator
Generate cryptographically random one-time pads and encrypt or decrypt messages with modular or XOR cipher modes entirely in your browser.
Playfair Cipher Encrypt & Decrypt
Encrypt and decrypt text using the Playfair cipher with interactive 5x5 key square and visual step-by-step guide.