Caesar Cipher / ROT13
Encrypt or decrypt text with a shift cipher, including ROT13.
This tool runs entirely in your browser. Your data is never uploaded, never stored, and never leaves your device.
Shifts every letter a fixed number of places along the alphabet and shifts it back again, covering ROT13 and the whole family of classroom shift ciphers used in puzzles, CTFs and spoiler-hiding.
How to use it
- 1Paste your text into Input text.
- 2Set Shift (0–25), or press ROT13 to jump straight to 13.
- 3Choose Encrypt or Decrypt — the Output box updates immediately — then Copy.
Example
- Input
- Attack at dawn! — shift 13, Encrypt
- Output
- Nggnpx ng qnja!
Spaces, punctuation and digits pass through untouched, which is exactly why the cipher is breakable: word shape and message length survive. ROT13 is its own inverse, so running the output through Encrypt at 13 again gives back the original.
What happens to your data
The shift is plain arithmetic on character codes — only the ranges 65–90 and 97–122 are touched, and every other code point is returned unchanged — so there is no key material to leak and nothing to look up. Values outside 0–25 are clamped before use rather than rejected, the output is recomputed on each render from the box above it, and neither the text nor the shift is written to the URL or to storage.
Last updated August 2026
You have hit a line of text that looks like English with the letters swapped — Uryyb jbeyq under a spoiler warning, a string in a puzzle hunt, a stage in a CTF that will not resolve. Or you are going the other way, hiding the ending of a film from people who have not watched it yet. Both are shift-cipher jobs.
Work out your direction before you type anything. Encrypting moves each letter forward through the alphabet; decrypting moves it back by the same amount. They are one operation with opposite signs, which is why text shifted forward by 3 also comes back if you shift it forward by 23, and why puzzle setters argue over whether the key is 3 or 23. If someone handed you ciphertext and a number, use Decrypt with that number and skip the arithmetic.
The format cannot keep a secret, and was never built to. Twenty-five keys is a list rather than a search — anyone can read your message by trying all of them, and letter counting usually gets there sooner. Use it for spoilers, teaching and puzzles; use real encryption for anything you would mind a stranger reading.
The common mistake is assuming you have a Caesar at all. If no single shift produces readable text, you are probably looking at a repeating-key cipher, a substitution with an arbitrary alphabet, or something that was Base64 before it was a cipher.
How it works
Toolvore works on character codes and nothing else. Each character is looked at in turn: codes 65 to 90 are the uppercase letters and 97 to 122 the lowercase, and only those two ranges are moved, each within itself, so case survives the round trip. Everything else — spaces, digits, punctuation, emoji, accented letters, any script outside the twenty-six-letter Latin alphabet — comes back exactly as it went in. The shift is reduced modulo 26 and forced positive before use, which is what lets Decrypt hand in a negative number and still land on a real letter. The weakness is in what is left alone: word lengths, sentence shape and the position of every apostrophe and full stop all survive, so the outline of your message stays readable even when the letters are not. A shift outside 0 to 25 is clamped rather than refused, and an empty shift box counts as zero, which returns your text unchanged instead of an error. The output is recalculated from the input box on every keystroke, so nothing accumulates between edits.
Common use cases
- Hiding a film spoiler in a comment
- Decoding a ROT13 string from a forum thread
- Working a shift-cipher stage in a CTF
- Demonstrating modular arithmetic to a class
- Reading obfuscated text in a puzzle hunt
- Obscuring an answer key before sharing it
Frequently asked questions
How do I crack a Caesar cipher when I do not know the shift?+
There are only twenty-five shifts worth trying, so step the number from 1 to 25 and read each result — the right one announces itself, because English is the only reading that will look like English. If you would rather not, count letters instead. In ordinary English text E is the most common letter by a wide margin, with T, A, O and I not far behind, so the distance from the most frequent ciphertext letter to E is usually the key. Short messages defeat counting, since a dozen letters are noise, and there a crib — a word you expect to appear — does better.
Is a Caesar cipher secure enough for anything?+
No, and it has not been for centuries. A key with twenty-five possible values falls to a person with a pencil, never mind a computer, and the ciphertext keeps enough structure that letter counting often finds the key on the first attempt. Treat it as obfuscation: it stops a passing eye, not an interested one. Anything that genuinely has to stay private wants modern encryption with a real key — an encrypted archive, an age or GPG file, an entry in a password manager — where the secrecy rests on a key nobody can guess rather than on a number between one and twenty-five.
What is ROT13 and why do people use it?+
ROT13 is a Caesar cipher with the shift fixed at 13. Because 13 is half of 26, applying it twice returns the original text, so one operation both scrambles and unscrambles. That property made it the usual way to hide punchlines, spoilers and puzzle answers in plain text on Usenet, and later on forums and mailing lists, where a reader could choose to decode rather than have the ending pushed at them. It was never offered as security. The ROT13 button sets the shift to 13 for you, and at that shift Encrypt and Decrypt give the same output.
If a message was encrypted with a shift of 3, what shift decrypts it?+
Either a backward shift of 3 or a forward shift of 23 — the same move, because the alphabet wraps at 26 and 26 minus 3 is 23. Switching to Decrypt and leaving the number at 3 is the version that is harder to get wrong, since you type the key you were given instead of doing arithmetic on it. The forward-only equivalent matters where a tool offers one direction only, such as a spreadsheet formula or a throwaway script. It also explains why puzzle setters disagree about naming: a shift of 3 and a shift of 23 describe one cipher from opposite ends.
Where does my text go when I use a cipher page in a browser?+
That depends on the tool, and it is worth knowing which kind you have. This one does the work in the page: the shift is arithmetic on character codes inside your browser, so there is no request to send and no server that could keep a copy. Your text lives in one piece of component state and the output is recomputed from it as you type — reload the page and both are gone. Neither the text nor the shift is written into the address bar or into browser storage, so there is no link carrying your message and nothing left for the next person at the machine.
Why do spaces, digits and punctuation come out unchanged?+
Because a shift cipher is defined over the twenty-six letters and nothing else — there is no agreed answer for what a comma shifted by seven ought to become. Variants exist: ROT5 rotates the digits 0 to 9, ROT18 pairs that with ROT13 so letters and numbers both move, and ROT47 shifts nearly every printable ASCII character. None of them is the classical Caesar, and this page implements the letters-only version. The cost is that everything you did not encrypt is a clue. Word boundaries, message length, an apostrophe near the end of a word, a question mark — all survive, and all help a reader guess.
Does a shift cipher work with accented letters or non-Latin alphabets?+
Not on those characters. Only plain Latin A to Z, upper and lower case, falls inside the code ranges the shift touches, so é, ü, ñ, ß and every Greek, Cyrillic, Arabic, Hebrew or CJK character passes through untouched. French or German text therefore comes out half scrambled and half readable, with the accented letters standing as landmarks that make the rest easier to guess. There is no universal fix, because a shift cipher needs a defined alphabet order and languages disagree about it — some treat an accented form as a variant of the base letter, others as a letter in its own right.
How is a Vigenère cipher different from a Caesar cipher?+
A Vigenère cipher uses a keyword instead of a single number: each letter of the keyword supplies the shift for one letter of the message, and the keyword repeats until the message runs out. The same plaintext letter therefore becomes different ciphertext letters depending on where it lands, which flattens the letter frequencies and defeats the counting that breaks a Caesar in seconds. A Caesar is the special case where the keyword is one letter long. If no single shift ever yields readable English, a repeating key is the usual reason — and its length, not the key itself, is what an attacker hunts for first.
Related tools
File Hash Checker
Compute SHA-1, SHA-256, and SHA-512 checksums of any file.
Unicode Escape/Unescape
Convert text to \u escape sequences and back.
Base64 Encode/Decode
Encode text to Base64 or decode Base64 back to text.
UUID Generator
Generate one or many random UUID v4 identifiers.