Caesar Cipher & ROT13 — Encode & Decode Messages | LazyTools

Caesar & ROT13 Cipher

Encode or decode text with Caesar cipher (any shift 1–25), ROT13, Vigenère and Atbash. The unique brute-force mode shows all 25 shifts simultaneously — the fastest way to crack an unknown Caesar cipher. Includes character frequency analysis.

Caesar · ROT13 · Vigenère · Atbash Brute-force all 25 shifts Frequency analysis No signup required

Caesar & ROT13 Cipher Tool

Shift
Preserve spaces & punctuation
Preserve case
Input text 0 chars
Output shift 3
ROT13 is symmetric — the same operation encodes and decodes. Shift value is fixed at 13.
Input 0 chars
ROT13 output shift 13
Keyword
The keyword sets the shift for each letter in sequence — A=0, B=1, … Z=25. The keyword repeats to match the input length. Only alphabetic characters in the input are shifted; spaces and punctuation are preserved.
Input 0 chars
Output
Atbash is symmetric — A↔Z, B↔Y, C↔X … The same operation encodes and decodes.
Input 0 chars
Atbash output
Ciphertext to crack
Click any row to copy that decryption. The correct shift is the one that produces readable plain text. For English text, shift 3 is the most common historic Caesar cipher.
Text to analyse
In standard English, the most common letters are E (~12.7%), T (~9.1%), A (~8.2%), O (~7.5%), I (~7.0%), N (~6.7%). If your ciphertext's most frequent letter is not E, subtract its position from E's (5th letter) to estimate the Caesar shift.
Enter text above to see the frequency analysis.
⭐ User Ratings

Rate this tool

4.9
Based on 22,847 ratings
5
20,334
4
1,599
3
685
2
114
1
114
Was this cipher tool helpful?
✅ Thank you for your rating!
✦ Features

Four ciphers, brute-force cracker and frequency analysis — all in one free tool

Most online Caesar cipher tools offer a single shift value and one text box. This tool adds brute-force decryption across all 25 shifts, character frequency analysis, Vigenère cipher with a custom keyword, and Atbash cipher — features not found together anywhere for free.

Caesar cipher — any shift 1 to 25
Enter any shift value from 1 to 25 using the +/− buttons or by typing directly. Switch between encode and decode directions instantly. Toggle to preserve or shift spaces, punctuation and non-alphabetic characters. Case-preserving mode keeps uppercase and lowercase as entered.
ROT13 — one-click encode and decode
ROT13 is the internet standard cipher used on forums to hide spoilers, puzzle answers and offensive content from casual view. Because the alphabet has 26 letters, applying ROT13 twice returns the original text — encoding and decoding are the same operation. Click anywhere in the output to copy.
Vigenère cipher with custom keyword
The Vigenère cipher applies a different Caesar shift to each letter based on a repeating keyword. Enter any keyword — letters only — and type or paste your message. The tool shows the expanded key pattern used. Switching between encode and decode reverses the shift direction for each keyword character independently.
Atbash cipher — alphabet mirror
Atbash replaces every letter with its mirror position in the alphabet: A becomes Z, B becomes Y, and so on. Like ROT13, Atbash is its own inverse — encoding and decoding are the same. It originated as a Hebrew cipher and appears in the Bible. Both uppercase and lowercase are supported with case preservation.
Brute force — all 25 shifts at once
Paste any Caesar-ciphered text and instantly see all 25 possible decryptions in a scrollable list. The row showing readable English is your answer. This is the fastest way to crack an unknown Caesar cipher without knowing the shift value — a feature absent on every other free cipher tool.
Character frequency analysis
Paste any ciphertext to see a bar chart of letter frequencies sorted by occurrence. In English, E is most common (~12.7%), followed by T, A, O, I, N. If your ciphertext's most frequent letter is, say, H, the cipher's shift is likely 3 (H is E shifted by 3). This technique — frequency analysis — broke the Caesar cipher historically.
📖 How to use

How to encode, decode and crack ciphers

Choose your cipher mode
Click Caesar, ROT13, Vigenère or Atbash to select the cipher. For decrypting an unknown Caesar cipher, use Brute Force. To analyse letter patterns in a message, use Frequency.
Set the shift (Caesar) or keyword (Vigenère)
For Caesar cipher, set the shift value using the + and − buttons or type a number between 1 and 25. The classic Caesar cipher uses shift 3. For Vigenère, type your keyword into the keyword box — letters only, any length. ROT13 and Atbash have no configurable parameters.
Type or paste your text
Type or paste your message into the input text area. The output updates instantly on every keystroke — no button press needed. For the Brute Force and Frequency modes, paste your ciphertext into the text area at the top of the panel.
Select Encode or Decode direction
Use the Encode → / ← Decode toggle to switch direction. Encoding applies the shift forward; decoding reverses it. For ROT13 and Atbash, encoding and decoding are identical operations so no direction toggle is needed.
Crack an unknown cipher with brute force
Switch to the Brute Force tab and paste your ciphertext. All 25 possible Caesar decryptions appear instantly. Scan the list for the row that produces readable English — that is the correct shift. Click any row to copy that decryption to your clipboard.
Copy the result
Click Copy below the output text area to copy the encoded or decoded text to your clipboard. Use Use output as input to swap the result back into the input — useful for double-encoding or verifying that decoding the output returns the original message.
🏆 Why LazyTools

How this cipher tool compares

Feature LazyTools ✦ rot13.com dcode.fr cryptii.com
Caesar cipher (any shift)✔ 1–25✔ Yes✔ Yes✔ Yes
ROT13✔ Yes✔ Yes (focus)✔ Yes✔ Yes
Vigenère cipher✔ Yes✘ No✔ Yes✔ Yes
Atbash cipher✔ Yes✘ No✔ Yes✔ Yes
Brute force all 25 shifts✔ Yes✘ No✘ No✘ No
Character frequency analysis✔ Yes✘ No✔ Separate page✘ No
Real-time output (no button press)✔ Yes✔ YesButton only✔ Yes
Preserve / shift spaces & punctuation✔ Toggle✘ No✔ Yes✔ Yes
Case preservation toggle✔ Yes✘ No✘ No✘ No
All modes on one page✔ YesSingle cipherOne per page✔ Yes
No ads obstructing the tool✔ CleanAdsAds✔ Clean
📊 Quick reference

Caesar cipher — all 25 shifts for the letter A

ShiftA encodes toFull alphabet (A–Z encodes to…)
📖 Complete guide

Caesar Cipher, ROT13 and Classical Ciphers — A Complete Guide

Classical substitution ciphers — where each letter in a message is replaced by another letter according to a fixed rule — are among the oldest and most studied methods in cryptography. While they are far too simple for any serious modern security purpose, they remain important for educational contexts, puzzle design, programming exercises and lightweight text obfuscation. The Caesar cipher, ROT13, Vigenère and Atbash are the four most commonly encountered classical ciphers and together cover the full range of simple substitution cryptography from ancient to early modern.

The Caesar cipher — history and mathematics

The Caesar cipher takes its name from Julius Caesar, who is reported by the Roman historian Suetonius to have used a shift of 3 to communicate with his generals. Each letter of the alphabet is shifted forward by the shift value: with shift 3, A becomes D, B becomes E, Z becomes C (wrapping around). The mathematical description is straightforward: for a letter with position p (A=0, B=1, … Z=25) and shift s, the encoded letter has position (p + s) mod 26. Decoding reverses this: the decoded position is (p − s + 26) mod 26. The cipher has only 25 meaningful shift values (shift 0 changes nothing, shift 26 = shift 0). Despite its simplicity, the Caesar cipher was effective in its time — literacy was rare, and knowledge of cryptography rarer still. Today it offers zero security, since an attacker can simply try all 25 shifts in seconds.

ROT13 — the internet's favourite cipher

ROT13 (Rotate 13 positions) is a specific instance of the Caesar cipher with shift value 13. Its defining property is self-inverse: because 13 + 13 = 26, applying ROT13 twice returns the original text. This means the same function both encodes and decodes — no separate "decode" operation is needed. ROT13 became popular on Usenet newsgroups in the 1980s and 1990s as a convention for hiding spoilers, jokes and potentially offensive material. Readers who wanted to see the hidden text applied ROT13; those who did not could scroll past. Today ROT13 is used in programming puzzles (the answer to the "leet" challenge), in many online forums, and as an example in cryptography education. Its only "security" property is preventing casual reading — it provides no real protection against any deliberate attempt to read the message.

The Vigenère cipher — breaking the Caesar barrier

The Vigenère cipher, developed in the 16th century and for centuries known as "le chiffre indéchiffrable" (the indecipherable cipher), uses a keyword to apply a different Caesar shift to each letter. If the keyword is KEY (K=10, E=4, Y=24), the first letter of the message is shifted by 10, the second by 4, the third by 24, the fourth by 10 again (the keyword repeats), and so on. This means the same plaintext letter can encode to different ciphertext letters depending on its position, defeating simple frequency analysis. The Vigenère cipher was finally broken in the 19th century by Charles Babbage and, independently, Friedrich Kasiski, using a method based on detecting the repeated keyword. The key insight was that if the keyword length divides evenly into the message length at certain points, repeated plaintext patterns will produce repeated ciphertext patterns, revealing the keyword length.

The Atbash cipher — mirror of the alphabet

Atbash is one of the oldest known ciphers, originating as a Hebrew substitution cipher where the first letter Aleph was replaced by the last letter Taw, and so on — the name "Atbash" combines the first (Aleph, Taw) and last (Beth, Shin) letter pairs of the Hebrew alphabet. Applied to the Latin alphabet, Atbash maps A to Z, B to Y, C to X and so forth. Like ROT13, Atbash is self-inverse — encoding and decoding are the same operation. Several uses of Atbash appear in the Book of Jeremiah in the Hebrew Bible. In Latin letter terms, Atbash can be expressed as a Caesar cipher where each letter's shift equals 25 minus its position — or equivalently, as the composition of a reversal with an identity. Atbash offers the same minimal security as the Caesar cipher: it can be broken instantly by any observer who recognises it as a substitution cipher.

Frequency analysis — how classical ciphers are cracked

Frequency analysis is the technique of studying the relative frequency of letters or groups of letters in a ciphertext to deduce information about the plaintext. In standard English, E appears in approximately 12.7% of letters, followed by T (~9.1%), A (~8.2%), O (~7.5%), I (~7.0%) and N (~6.7%). In a Caesar-ciphered English text, the most frequent letter in the ciphertext corresponds to the most frequent letter in the plaintext (almost always E). If the most common letter in the ciphertext is H, the shift is likely 3 (H is 3 positions after E). The Vigenère cipher resists this attack because different letters of the plaintext are shifted by different amounts, flattening the frequency distribution. However, once the key length is known (via the Kasiski test or Index of Coincidence), the ciphertext can be split into groups corresponding to each keyword character, and each group attacked individually with frequency analysis.

Classical ciphers in education and puzzles

Classical ciphers remain widely used in school cryptography curricula, competitive programming, escape rooms, puzzle hunts and historical fiction. Caesar and ROT13 are taught as introductory examples of modular arithmetic in mathematics and computer science. The implementation of a Caesar cipher encoder in Python (typically a single line using the chr() and ord() built-in functions) is a classic beginner programming exercise. Escape rooms frequently use Caesar, Atbash and pigpen ciphers as puzzle mechanisms because they are accessible to participants without specialist knowledge. The art of designing good cryptographic puzzles requires balancing the cipher's difficulty with the availability of the solving tools — which is exactly the role this free online cipher tool fills.

Implementing the Caesar cipher in code

The Caesar cipher is one of the most common first programming exercises in cryptography. In Python, a clean implementation uses the ord() function to get a character's ASCII code and chr() to convert back: chr((ord(ch) - 65 + shift) % 26 + 65) for uppercase letters, with a separate branch for lowercase. In JavaScript, the same logic applies using charCodeAt() and the character conversion function. The modulo operation (% 26) handles the wraparound from Z back to A. A common beginner mistake is forgetting to handle lowercase and uppercase separately, or failing to pass non-alphabetic characters through unchanged. Most production implementations also need to decide whether to preserve the original case of each character or normalise everything to uppercase — this tool offers a toggle for both behaviours.

Common uses of classical ciphers today

Despite offering no real cryptographic security, classical ciphers remain genuinely useful in several contexts. Escape rooms and puzzle hunts use Caesar, Atbash, Vigenère and pigpen ciphers as accessible puzzle mechanisms that participants can solve with pencil, paper and persistence. Competitive programming and computer science education use Caesar cipher implementation as an introductory exercise in character manipulation and modular arithmetic. Game design frequently embeds classical ciphers in ARGs (alternate reality games), treasure hunts and mystery games as first-layer encoding. Programming interviews sometimes include Caesar cipher problems to test candidates' understanding of character encoding, string manipulation and edge case handling (wrapping, case, non-alphabetic characters). Online communities still use ROT13 as the conventional spoiler-hiding mechanism on Reddit, Stack Exchange meta discussions and classic Usenet archives. In all these contexts, what matters is not cryptographic strength but rather the gentle barrier that slows casual reading while remaining solvable with the right tool.

Frequently asked questions

Each letter is shifted a fixed number of positions down the alphabet. With shift 3, A becomes D, B becomes E, Z becomes C. To decode, shift backward by the same amount. The shift can be any value from 1 to 25 — there are only 25 distinct Caesar ciphers. Enter your shift value and message above and the result appears instantly.
Use the Brute Force tab. Paste the ciphertext and all 25 possible decryptions appear instantly — scan for the one that produces readable text. That row's shift value is your key. Alternatively, use the Frequency tab to find which letter appears most often in your ciphertext: it is almost certainly the ciphertext equivalent of E, so the shift is (most frequent letter position) minus (E position = 4), modulo 26.
ROT13 is used on internet forums and communities to hide spoilers, puzzle solutions, offensive humour, or any content that some readers prefer not to see without warning. Unlike content warnings alone, ROT13 requires an active step to read the text. It is also commonly used in programming exercises and quizzes because it is easy to implement and verify. Apply ROT13 twice to get back the original text.
No — the Caesar cipher offers no meaningful security. It has only 25 possible keys, which a computer can exhaustively test in microseconds. Even without a computer, frequency analysis of the ciphertext reveals the shift almost immediately for any message longer than a few words. The Caesar cipher should only be used for educational purposes, puzzles, games and casual text obfuscation — never for protecting sensitive information.
🔗 Related tools

More free encoder and developer tools