Cipher Tools

Encode and decode messages with the classic letter-swapping ciphers — ROT13, Caesar, Atbash and Vigenère. There is also a view laying out all twenty-six Caesar shifts at once, which is how these puzzles usually get cracked.

How to use it

All four of these shift letters around the alphabet in a fixed, predictable way.

  1. Pick your cipher ROT13 is the most common online. Caesar lets you choose any shift. Atbash reverses the alphabet. Vigenère uses a keyword.
  2. Type or paste the message Only letters are changed. Spaces, numbers and punctuation pass straight through, which keeps the message readable.
  3. Set the shift or keyword if needed Caesar needs a number from 1 to 25; Vigenère needs a word. ROT13 and Atbash need nothing at all.
Full instructions

Input

Result

In depth

Scrambling letters the old-fashioned way

Long before computers, people hid messages by sliding letters around the alphabet. Those old codes are still fun, and still taught, because you can work them with a pencil. This page runs four of the classics for you: ROT13, the Caesar shift, Atbash and the keyword code named after Vigenere. This guide explains what each one does, which controls turn on for which code, and how to crack a Caesar when you do not know the setting.

Screenshot: How these ciphers work
How these ciphers work as it appears when the page opens.

What these codes are for

These are the ciphers of puzzle books, escape rooms, treasure hunts and coding lessons. You meet them in a riddle that spits out a line of nonsense letters. You meet them when a class is learning how secret writing began. You meet them when a forum hides the end of a story so it does not spoil it for everyone.

They are simple on purpose. Each one just moves letters around the alphabet by a fixed rule. That makes them a joy for a puzzle and a good way to learn the idea of a code. It also makes them easy to break, which this page is honest about rather than pretending otherwise.

Picking a code

The first menu, Cipher, chooses which of the four you are using. ROT13 is the one you see most online. Caesar shift lets you pick how far the letters move. Atbash flips the alphabet end to end. Vigenere uses a secret word to vary the moves.

Your choice here changes the page. Some codes need extra settings and some need none, so the tool shows only the controls that matter for the code you picked. Nothing else clutters the panel. That is why the row of options looks different from one code to the next.

The settings that appear

Three controls come and go depending on the code. Direction is a simple Encode or Decode switch. It shows up for Caesar and Vigenere, where the two ways round are different. It hides for ROT13 and Atbash, because those two undo themselves and the direction would make no difference.

Shift by is a slider that appears only for Caesar. It runs from one to twenty-five, and the number beside the label shows where you have set it. Keyword is a text box that appears only for Vigenere. It comes filled with a starting word, which you replace with your own. Set the code, and the right controls are simply there.

Typing your message

The left pane, Input, is where your message goes. The right pane, Result, shows the scrambled or unscrambled version, and updates as you type. You never press a run button.

Only letters are touched. Spaces, numbers and punctuation slide straight through unchanged. That is deliberate, and it keeps the shape of the message readable, so word lengths and line breaks survive. It is also why a coded message still looks like a message, with the same gaps, rather than one solid block.

A Caesar shift, worked through

Choose Caesar shift, set Direction to Encode, and drag the slider to three. Press Try an example and the input fills with the line Meet me at the old bridge at midnight. The result pane reads Phhw ph dw wkh rog eulgjh dw plgqljw. Every letter has moved three places up the alphabet, so M became P and e became h, while the spaces stayed put.

To read it back, the receiver sets the same code with Decode chosen and the slider on three. The scrambled line goes in and the plain message comes out. The small counts under the result confirm what you did, showing the number of letters and the name of the code, in this case Caesar shift three.

Cracking a Caesar you cannot read

The real fun is breaking one without the key. A Caesar shift has only twenty-five possible settings, so you can simply try them all. When Caesar is chosen, a panel called Try every shift appears below the result. Press Show all twenty-five shifts.

The panel lists every shift in turn, each with the start of your message decoded that way. It uses only the opening stretch of your text, which is plenty to spot the right one and keeps the list quick to scan. You read down it. Twenty-four lines are gibberish, and one turns into plain English. That readable line is the answer, and its shift number is the key. This is genuinely how these puzzles are solved, and doing twenty-five tries by hand is exactly the chore the panel spares you. Once you know the shift, you can go back to the main panel, set Decode with that number, and turn the whole message readable in one step.

The two that undo themselves

ROT13 and Atbash share a neat property: run either one twice and you are back where you started. That is why they need no Direction switch. ROT13 moves every letter thirteen places. Since the alphabet has twenty-six letters, thirteen is exactly halfway, so a second pass completes the loop. This is how forums once hid spoilers, since one button both hid and revealed them.

Atbash swaps each letter for its mirror. A trades with Z, B trades with Y, and so on down the line. Do it again and every pair swaps back. With either code chosen, a small note under the result reminds you that the code undoes itself, so you never have to hunt for a decode option that is not there.

Seeing a self-undoing code work

A quick example makes the loop obvious. Choose ROT13 and type the single word Spoiler. The result reads Fcbvyre. Now copy that result, clear the input, and paste Fcbvyre back in. The result turns straight back into Spoiler. One code, one button, and it reveals as easily as it hides.

Atbash behaves the same way, just by a different rule. Choose Atbash and type cat. The result reads xzg, because c mirrors to x, a mirrors to z, and t mirrors to g. Feed xzg back in and cat returns. This is why neither code offers a Decode option. There is nothing to choose, since the one action is its own reverse, and the note under the result says as much so you are never left looking for a switch that does not exist.

Vigenere and its keyword

Vigenere is the strongest of the four, because the amount each letter moves keeps changing along a secret word. Choose it and a Keyword box appears. Type a word, and each letter of your message is shifted by the next letter of that word, looping the word as it goes.

A few rules keep it steady. Only the letters of your keyword count, so its capitals and any punctuation are ignored, and a word typed two ways behaves the same. The keyword must not be empty, and the page will say so if you clear it. One warning worth heeding: a very short keyword is weak, and a keyword of a single letter is really just a Caesar shift wearing a disguise. As a tiny example, the keyword cab turns hello into jemno, and the same keyword with Decode turns jemno back into hello.

The buttons around the panes

Two small buttons sit up by the settings. Try an example drops in a ready message so you can watch a code work without inventing one. Clear empties the input for a fresh start.

Above the result are two more, greyed out until there is something to hand over. Copy places the result on your clipboard. Download saves it as a plain text file named cipher.txt. Because the result is read-only, you can copy it freely and never nudge a letter out of place while you do. If you are passing a coded message to a friend, remember they need the same code and the same setting to read it, so send those along by some other route.

When this is the wrong tool

Reach for this page for play and for learning, and never for a real secret. These codes were cracked long ago, and a modern computer unravels any of them in a blink. Use them for a puzzle you are making, a game you are running, or a lesson on where the whole idea of coded writing came from.

If a message truly has to stay private, none of these will protect it. That job needs proper modern encryption, which is a different kind of tool entirely. And if you have a scrambled message and no idea which code made it, the frequency helper on this site can point you at the likely method before you come here to undo it.

Everything stays on your machine

The scrambling and unscrambling happen right here in your browser. Your message is handled on your own device, and nothing you type is sent away, logged or saved on a server. For a puzzle that is a convenience, and for anything you would rather keep to yourself it is the point.

Your last message and settings are remembered on this device, so the page opens as you left it. That memory is local and private to this browser. Clear the box, and what you wrote is gone.

Help

How these ciphers work

All four of these shift letters around the alphabet in a fixed, predictable way. They are the ciphers you meet in puzzle books, escape rooms, treasure hunts and programming exercises — simple enough to do with pencil and paper, which is exactly the point.

Pick your cipher

ROT13 is the most common online. Caesar lets you choose any shift. Atbash reverses the alphabet. Vigenère uses a keyword.

Type or paste the message

Only letters are changed. Spaces, numbers and punctuation pass straight through, which keeps the message readable.

Set the shift or keyword if needed

Caesar needs a number from 1 to 25; Vigenère needs a word. ROT13 and Atbash need nothing at all.

Stuck on a puzzle? Try every shift

With Caesar selected, the brute-force panel shows all 25 possibilities at once. One of them will be readable.

These are puzzles, not security

Every cipher on this page can be broken by hand. Caesar has only 25 possible keys, so trying them all takes a minute — which is what the button below the result does for you. Atbash and ROT13 have no key at all; knowing the method is knowing the answer. Even Vigenère, which held out for three centuries and was once called the indecipherable cipher, fell to frequency analysis in the 1800s and is trivial for a computer now. Use these for games, puzzles and learning how encryption ideas began. For anything you actually need to keep private, use proper modern encryption.

Good to know

ROT13 is just Caesar with a shift of 13

Because 13 is half of 26, applying it twice returns the original. That is why forums used it to hide spoilers — one button both hides and reveals.

Atbash is its own opposite too

A becomes Z, B becomes Y, and running it again puts everything back. It is one of the oldest known ciphers, found in ancient Hebrew texts.

Vigenère keys must match exactly

The recipient needs the same keyword, spelled the same way. Case and punctuation in the keyword are ignored, so "Orchid" and "orchid" behave identically.

Short keywords are weak

A one-letter Vigenère key is just a Caesar shift. Longer keys are stronger — though still not secure by any modern standard.

Common questions

What is ROT13?
A Caesar cipher that shifts every letter 13 places. Since the alphabet has 26 letters, applying it twice gives you the original text back.
How do I break a Caesar cipher without the key?
Try all 25 shifts and see which one produces English. Select Caesar and use the "Show all 25 shifts" panel — the answer will jump out.
What is the difference between Caesar and Vigenère?
Caesar shifts every letter by the same amount. Vigenère uses a keyword so the shift changes from letter to letter, which is much harder to break by hand.
Are these ciphers secure?
No, not at all. They are puzzle and teaching ciphers. Anyone with a pen and a few minutes can break them, and a computer does it instantly.
Why are numbers and punctuation unchanged?
These ciphers were designed for letters only. Leaving everything else alone is the standard behaviour and keeps word shapes recognisable.
Is my text sent anywhere?
No. Everything happens in your browser. Nothing is uploaded, logged or stored on any server.