Secret Code & Cipher Tools
Controls
- Type or paste into the message boxes; results update as you type
- Click or tap the tabs, cipher chips, Encode/Decode and the shift slider (or - and +)
- Tap pigpen symbols on the keypad to decode
- Enter checks a puzzle answer
These free secret code tools encode and decode messages with the Caesar cipher and seven other classic codes: ROT13, Atbash, Vigenère, A1Z26, keyboard shift, reverse writing and the pigpen cipher. You can crack a Caesar code without knowing the shift, and the Puzzles tab has 30 kid-friendly secret messages to break. Everything runs in your browser.
How to use the Caesar cipher tool
- Type your message in the top box on the Caesar tab.
- Pick Encode or Decode and set the shift with the slider or the – and + buttons. The strip under the slider shows which letter each letter turns into.
- Copy the result, or press Use as input to run it back the other way.
Capital and small letters keep their case. Spaces, digits, punctuation and accented letters are left as they are.
Cracking a Caesar code
A Caesar cipher has only 25 useful shifts, so the fastest way to break one is to try them all. The Crack it list does exactly that for whatever is in the input box. It scores each attempt by how much it looks like English, using how often each letter and each pair of letters appears in English, plus a bonus for common words, and puts the best match first. Tap any row to decode with that shift. In our tests with 50 English sentences, each encoded with all 25 shifts, the true shift came first every time. Very short codes of only a few letters can still fool it, so read the top few rows.
The other ciphers
- ROT13 is a Caesar shift of 13. Because the alphabet has 26 letters, the same step encodes and decodes.
- Atbash flips the alphabet, so A swaps with Z and B with Y. It also undoes itself.
- Vigenère shifts each letter by the matching letter of a keyword (A = 0, B = 1), and the keyword repeats. Spaces and punctuation do not use up a keyword letter, so you need the same keyword to decode.
- A1Z26 turns letters into numbers: A = 1 up to Z = 26, with dashes between the letters of a word.
- Keyboard shift moves each letter one key to the right on a QWERTY keyboard, wrapping at the end of each row. Decoding moves one key left.
- Reverse writes the whole message, or each word, backward.
Each cipher has a short note on the page with a link to its Wikipedia article.
Pigpen cipher
The pigpen cipher swaps each letter for a shape. The tool uses one common layout: two tic-tac-toe grids and two X shapes, with a dot in the second grid and the second X. Type a message to see it drawn as symbols, or tap symbols on the keypad to turn a pigpen message back into letters. The key is shown under the keypad.
Crack the code puzzles
The Puzzles tab has 10 secret messages at each of three levels. Easy puzzles name the cipher and usually give the shift. Medium puzzles name the cipher but you work out the key. Hard puzzles do not say which cipher was used. Type the decoded message and press Check; capital letters, spaces and punctuation do not matter. Each puzzle has up to three hints, and fewer hints means more points. Open decoder loads the code into the matching tool. Your progress and points are saved in this browser.
Tips for young code breakers
- Look for one-letter words. In English they are almost always A or I, which gives away the shift.
- The most common letter in English is E, so the most common letter in a long Caesar code often stands for E.
- Make up your own keyword with a friend for Vigenère messages. Without the keyword they are much harder to read.
FAQ
Why is it called the Caesar cipher?
It is named after Julius Caesar. According to the Roman historian Suetonius, Caesar used a shift of three in his private letters, so A became D.
Are these codes safe for real secrets?
No. All of them can be broken with a pencil or a few seconds of computer time. They are great for games, puzzles and learning how codes work, but not for passwords or private information.
Is ROT13 the same as a Caesar cipher?
Yes. ROT13 is the Caesar cipher with a shift of 13, which is why the same step both hides and reveals the message.
Enjoy word puzzles? Try guessing the hidden word in Hangman or untangle letters in Word Scramble.





