Skip to content

↑↓ navigate ↵ open Esc close Search runs locally

Ciphers and codes: encrypt, decode and crack classic ciphers

From Caesar's shift of 3 to the Vigenère cipher that stood for three centuries. Every tool here encrypts and decrypts, and the ones with keys can also crack messages without them.

  • Runs in your browser
  • 14 ciphers
  • Solvers for keyed ciphers

All cipher tools

Which cipher do I have?

Look at what the encrypted text looks like, then open the matching tool. Each solver confirms the guess in a second.

  • Only letters changed, the same letter always becomes the same letter, word lengths keptCaesar (try all shifts)
  • As above and nothing fits a shiftAffine
  • Looks like the alphabet was reversed (A ↔ Z)Atbash
  • Letters, digits and symbols are all scrambled, spaces keptROT47
  • Normal text became Chinese or Japanese charactersROT8000
  • The same letter becomes different letters, and frequencies look flatVigenère (use the key solver)
  • A spoiler or joke on a forum, letters onlyROT13
  • The original letters are all there, just in a different orderRail fence (try all rails)
  • Letters in the right amounts but scrambled in blocks, with a keywordColumnar transposition
  • Even number of letters, no J, never a double letter inside a pairPlayfair
  • Dots and dashesMorse code
  • Numbers between 1 and 26A1Z26
  • Pairs of digits from 1 to 5Polybius square
  • Groups of five A/B (or 0/1), or a sentence with odd capital lettersBacon cipher

Ciphers compared

The last column shows the word Hello encrypted with each cipher (and the key in brackets).

CipherTypeKeyPossible keysSelf-inverseBroken by"Hello"
Caesar Shift Shift 1–25 25 No Trying all 25 shifts Khoor (shift 3)
ROT13 Shift None 1 Yes Anyone who knows it Uryyb
ROT47 Shift (ASCII) None 1 Yes Anyone who knows it w6==@
ROT8000 Shift (Unicode) None 1 Yes Anyone who knows it 籑籮籵籵籸
Atbash Mirror None 1 Yes Anyone who knows it Svool
Affine Substitution a and b 312 No Trying all 312 keys Rclla (a=5, b=8)
Vigenère Polyalphabetic Keyword Huge No Key length + frequency analysis Sixzb (key LEMON)
Playfair Digraph substitution Keyword Huge No Letter-pair frequencies DMYRAN (key PLAYFAIR EXAMPLE)
Rail fence Transposition Number of rails Under 150 No Trying every rail count Hoell (3 rails)
Columnar transposition Transposition Keyword k! orders No Anagramming the columns olelH (key ZEBRAS)
Polybius square Coordinates Optional keyword 1 (standard) No Frequency analysis 23 15 31 31 34
Bacon Binary code / steganography None 1 No Spotting two styles of letters AABBB AABAA ABABB ABABB ABBBA
A1Z26 Code None 1 No Anyone who knows it 8-5-12-12-15
Morse code Code None 1 No Anyone who knows it .... . .-.. .-.. ---

How classic ciphers work

Most classic ciphers are substitution ciphers: each letter is replaced by another. In a monoalphabetic cipher such as Caesar, Atbash or affine, a letter always becomes the same letter, so the message keeps the letter frequencies of normal language. That is their weakness: in English, E, T and A are common, and their replacements stand out.

Polyalphabetic ciphers such as Vigenère change the substitution from letter to letter using a keyword, which flattens those frequencies. They held out for centuries, until cryptographers learned to find the key length and split the message back into simple Caesar ciphers.

Transposition ciphers such as the rail fence and columnar transposition do not replace letters at all: they only change their order, so letter frequencies stay exactly the same as in normal text. That is a quick way to recognise them.

None of these ciphers is safe for real secrets today. For that, modern encryption such as AES is used. If you only need to turn data into text, look at our encoding tools instead.

Frequently asked questions

What is the difference between a cipher and an encoding?

A cipher is meant to hide a message and usually needs a key. An encoding, such as Base64 or URL encoding, only changes how data is written and has no secret at all. Classic ciphers are no longer secure, but they still need a key or method to read.

Which classic cipher is the hardest to break?

Of the ciphers here, Vigenère with a long key is the hardest, because the same letter is encrypted in different ways. It is still breakable with enough text, as the solver on its page shows.

How can I tell which cipher was used?

Look at what changed. If only letters changed and each letter always maps to the same letter, it is a substitution like Caesar, Atbash or affine. If symbols changed too, think ROT47. If letter frequencies look flat, it is probably Vigenère. The table above lists the common signs.

Are these ciphers safe to use for passwords?

No. Every cipher on this page can be broken in seconds by a computer. They are great for puzzles, games, escape rooms and learning how cryptography works.

Your next tool is one search away.

Free, private developer tools that run in your browser. No signup, nothing uploaded, no waiting.

Browse all tools

Tip: press Ctrl D to bookmark dev247.