Reference

What Is a Cipher?

A cipher is a method for turning readable text into a scrambled form so that only someone who knows the method (and often a key) can turn it back. Ciphers work at the level of individual letters or bits, which sets them apart from codes that replace whole words or phrases.

Last updated 14 July 2026

Cipher versus code

The words cipher and code are often used loosely, but they mean different things. A cipher transforms each letter by a rule, such as shifting it along the alphabet. A code replaces entire words or ideas with other symbols, like a codebook that maps attack at dawn to a single word.

Morse code, despite its name, is really a way of representing letters as signals rather than hiding meaning, so it is an encoding. A Caesar cipher, which shifts letters to conceal a message, is a true cipher.

The main types of cipher

Substitution ciphers replace each letter with another, like Caesar (a fixed shift), Atbash (a mirrored alphabet) or the pigpen symbol cipher. Vigenere is a polyalphabetic substitution: it uses a keyword so the shift changes as you go.

Transposition ciphers instead rearrange the letters without changing them. Modern computer ciphers combine substitution and transposition many times over, but the classic ciphers on this site are the perfect way to understand the ideas.

What are the different types of cipher and code?

It helps to split them into four families. Codes and encodings (Morse, binary, Base64) change the form of a message without hiding it. Classic ciphers (Caesar, Vigenere, Playfair, rail fence, affine, Atbash) genuinely conceal it using a rule and usually a key. Alphabets (braille, the NATO phonetic alphabet, pigpen) swap one symbol per letter for readability rather than secrecy. Word games (Pig Latin, leetspeak) simply rearrange or restyle letters for fun.

The table below sorts every translator on this site into those families, which is the quickest way to see what a given method actually does before you use it.

The main families of cipher and code, and what belongs in each
FamilyWhat it doesExamples
CodesNot secret at all. These represent letters as signals, dots or bits so they can travel by radio, wire or touch.Morse Code, Binary Code, Text to Binary, Binary to Text, Base64 Text
Classic ciphersTrue ciphers. Each letter is replaced or moved by a rule, and often a key, so the message is hidden rather than just re-encoded.Caesar Cipher, ROT13, Atbash Cipher, Vigenere Cipher, A1Z26, Tap Code, Pigpen Cipher, Playfair Cipher, Rail Fence Cipher, Bacon Cipher, Affine Cipher, Polybius Square
AlphabetsLetter systems. One symbol, word or cell per letter, designed to be read reliably rather than kept secret.Braille, NATO Phonetic Alphabet
For funWord games. The transformation is obvious once you know it, so they are for play rather than privacy.Pig Latin, Leetspeak (1337)

How strong are the classic ciphers?

Weak, by design and by age. A Caesar cipher has only 25 possible keys, so trying all of them takes seconds. Any single-alphabet substitution, pigpen included, leaks letter frequencies: the most common symbol in an English message is almost always E. Vigenere resists that until the key length is found, then falls apart the same way.

That does not make them pointless. They are the clearest way to understand the two ideas every modern cipher still relies on, substitution and transposition, and they are the backbone of puzzle hunts, escape rooms and geocaching. For anything that genuinely needs protecting, use modern encryption instead.

Frequently asked questions

What does cipher mean?

A cipher is a system for turning readable text into a disguised form by transforming each letter or bit according to a rule, so that only someone who knows the rule (and any key) can read it back. The word can also mean the disguised text itself, or the algorithm as a whole.

What is the difference between a cipher and a code?

A cipher scrambles individual letters or bits by a rule. A code replaces whole words or phrases with other symbols, usually via a codebook. Caesar is a cipher; a codebook mapping phrases to numbers is a code.

What is the simplest cipher to learn?

The Caesar cipher, which shifts every letter a fixed number of places. It is easy to understand, easy to use, and the classic first step into cryptography.

Are these ciphers secure?

The classic ciphers here are for learning and puzzles, not for protecting real secrets. Modern encryption uses far more complex methods, but the ideas start here.

Keep exploring