Caesar Cipher Encoder & Decoder

Encode and decode Caesar cipher, ROT13, Atbash and Vigenère online. Brute-force all 25 shifts to crack a message. Free, private, runs in your browser.

🌐 Español

🔒 Private by design: your text is processed locally in your browser and never uploaded to any server.

Two boxes, and which one the key belongs in

This page borrows the site’s two-textarea layout, the one built for comparing an original against a changed version, so the labels are generic. Put the message you want to encode or decode in Original text. The second box, Changed text, is the Vigenère key and nothing else; Caesar, ROT13 and Atbash never read it, so leaving it empty in those modes is correct rather than an oversight.

Two consequences of that shared layout are worth knowing before they surprise you. The button that runs the cipher carries this page’s own name instead of the word Encode. And once a result appears, the input boxes and the settings are replaced by the output, with a Copy to clipboard button and a reset button labelled Compare another. Click that to get the form back; it empties both boxes and the output, so copy anything you want to keep first.

Four ciphers, and what each does with the shift and the key

Caesar cipher slides every letter a fixed number of places along the alphabet, wrapping past Z back round to A. The Shift (Caesar only) field takes a whole number from 1 to 25 and starts at 3, the shift Julius Caesar is reported to have used. Encoding shifts forward, decoding shifts back by the same amount, so HELLO at shift 3 encodes to KHOOR and KHOOR at shift 3 decodes to HELLO. No other cipher on this page reads that field.

ROT13 is Caesar nailed to 13. Thirteen is exactly half of twenty six, so applying it twice returns the original, which makes encoding and decoding the same operation: Hello becomes Uryyb, and Uryyb becomes Hello. The Direction setting genuinely makes no difference here, and neither does the shift.

Atbash mirrors the alphabet instead of rotating it, so A becomes Z, B becomes Y, and WIZARD becomes DRAZIW. Like ROT13 it is its own inverse, so the direction setting is again irrelevant.

Vigenère uses a key word to choose a different Caesar shift for each letter. With the key LEMON the first letter shifts by L, the second by E, and the key repeats for as long as the message runs. The textbook example, ATTACKATDAWN with LEMON, gives LXFOPVEFRNHR. Only the letters A to Z in your key are used and case is ignored, so a key typed with punctuation and spaces in it behaves exactly like the bare letters; a key with no letters at all produces an error report instead of output.

Running a message through, from paste to result

  1. Paste the message into Original text, and in Vigenère mode type the key into Changed text as well.
  2. Choose the cipher in the Cipher dropdown. Alongside the four ciphers there is a fifth entry that cracks a Caesar message by trying every shift.
  3. Set Direction to encode or decode, and for Caesar set Shift (Caesar only).
  4. Click the page’s own button to run it, then take the result with Copy to clipboard.

Nothing happens until you click, and the result replaces the form rather than appearing beside it, so a stray second click cannot quietly re-encode a message that was already encoded.

Letters A to Z, and everything else passing straight through

All four ciphers operate on the twenty six letter Latin alphabet only. Case is preserved, so Hello at shift 3 comes back as Khoor rather than KHOOR. Everything else is copied through untouched: digits, spaces, punctuation, line breaks, emoji, and accented letters. That last group catches people out. Characters like é, ñ and ü are not members of the cipher alphabet, so they survive a round trip unchanged and can quietly leak the shape of a word to anyone reading the ciphertext.

Vigenère handles spacing the classical way, advancing the key only on letters. A space or a comma in the message consumes no key letter, which is why ATTACK AT DAWN with the key LEMON gives LXFOPV EF RNHR: the same letter mapping as the unspaced version, with the spaces simply put back where they were.

Twenty five shifts is not a key space

The crack-it entry in the Cipher dropdown decodes your ciphertext with every shift from 1 to 25 and prints all twenty five candidates as a labelled list, one per line, under a short header telling you to read down it. Exactly one line will be readable, and the shift number on that line is the key. Skimming the list is the entire attack, which is the whole point: a cipher with twenty five possible keys is a puzzle, not protection. The mode always decodes, so the direction setting has nothing to do there either.

Vigenère survives brute force but not analysis, having been reliably breakable since Kasiski published his method in 1863. So these are the right tools for an escape room prop, a geocache hint, a CTF warm-up or a first cryptography lesson, and the wrong tool for anything you actually need kept secret. For that, encrypt a text message with a password derives a key from your passphrase and encrypts with AES-256-GCM, also without sending anything anywhere. For a transformation that is not secrecy at all and is often confused for it, Base64 encode is what people usually mean when they say encoded. And the Morse code translator covers the other classic substitution alphabet, although it decodes only to uppercase, because Morse carries no case information to recover.

See it in action

Screenshot of the Caesar Cipher Encoder & Decoder tool with the sample input “EVERYTHING RUNS IN YOUR BROWSER”, Cipher set to Caesar cipher, Direction set to Encode (encrypt)
Caesar Cipher Encoder & Decoder mid-process: the sample input “EVERYTHING RUNS IN YOUR BROWSER”, Cipher set to Caesar cipher, Direction set to Encode (encrypt).
Screenshot of the Caesar Cipher Encoder & Decoder result screen showing the generated output “HYHUBWKLQJ UXQV LQ BRXU EURZVHU”
The finished result: the generated output “HYHUBWKLQJ UXQV LQ BRXU EURZVHU”. The download link is a local blob URL — the file never leaves your device.

Frequently asked questions

Can I use a negative shift, or a shift of 0 or 26?

No. The shift field takes a whole number from 1 to 25, and anything outside that is pulled back into range before the cipher runs, with non-numeric input falling back to 3. You never need a negative shift here anyway, because decoding with the same positive number reverses the encode. A shift of 0 or 26 would leave the text untouched, which is why neither is offered.

Why is the reset button labelled Compare another?

Because this page reuses the site's two-box text layout, which was originally built for comparing an original against a changed version, and that shared component supplies its own button text. It behaves as a reset here, emptying both input boxes and the output and bringing the form back. The cipher, direction and shift you had chosen stay as they were, so a second message runs under the same settings.

What happens if I run it with the key box filled but the message box empty?

You get a report that starts with a status of ERROR and tells you to paste your text into the first box. The run button becomes available as soon as either box has something in it, so filling only the key and clicking is possible, and the tool answers with that specific message in the output area rather than a generic failure banner.

Does the crack-it mode work on ROT13 or Atbash text?

It works on ROT13 by definition, because ROT13 is Caesar at shift 13, so the readable line in the list will be the one labelled 13. It cannot touch Atbash, which mirrors the alphabet rather than rotating it, and no rotation undoes a mirror. If none of the twenty five lines reads as text, Atbash, Vigenère, or something that is not a classical cipher at all are the next things to try.

Can I run a whole document through it?

You can paste as much text as you like into the first box, and it is all processed in your browser in a single pass with the result appearing in the output box. There is no file upload and no file download, so the only routes in and out are paste and copy, and the practical limit is how much text you are willing to move through the clipboard rather than any cap in the tool itself.

Will a message encoded here decode correctly in another Caesar tool?

For Caesar, ROT13 and Atbash, yes, since there is only one sensible way to define them and this page follows it, wrapping past Z and leaving non-letters alone. Vigenère is the one to check, because implementations disagree about whether the key advances over spaces and punctuation. This page uses the standard convention where it does not, so a tool that advances the key on every character will produce a different result from the same key.

Related tools