lans.cloud Tools

Cipher Decoder & Encoder

Free cipher decoder and encoder that shows every step: Caesar, ROT13, Atbash, A1Z26, Morse, Vigenère, keyword, rail fence, Playfair, and pigpen symbols with a printable chart — each letter explained as it transforms.

Was this tool helpful?
Support this site

More tools

How to encode and decode a message with a classical cipher

Pick, key, type, play. The last two steps are where the cipher stops being a black box.

  1. Pick a cipher and choose which way you are going

    Ten classical ciphers are here. Encode scrambles, decode unscrambles, except ROT13, which is its own inverse, so both directions do the identical thing. Pigpen is encode-only, because drawn symbols cannot be typed back in; read those off the chart further down the page.

  2. Give it a key, if that cipher takes one

    Caesar wants a shift from 1 to 25. Rail fence wants a number of rails from 2 to 10. Vigenère, keyword substitution and Playfair all want a keyword of up to 30 letters. The other five (ROT13, Atbash, A1Z26, Morse and pigpen) need nothing at all, and the key box disappears for them.

  3. Type or paste the message

    Up to 2,000 characters. The five substitution ciphers (Caesar, ROT13, Atbash, Vigenère and keyword) leave spaces, punctuation and digits exactly where they are, so the text decodes back to what you typed. The rest each differ: rail fence keeps every character but moves all of them, Morse keeps digits and drops punctuation, and A1Z26 and Playfair are letters-only. Playfair also inserts padding letters, so it gives back slightly more than you gave it.

  4. Play it back one letter at a time

    The step player walks the message token by token, with play and pause, single-stepping in both directions, and a speed control. Caesar, ROT13 and Vigenère animate the real walk down the alphabet; the substitution and lookup ciphers deliberately do not, because showing a walk would suggest a mechanism they are not using.

  5. Read the step table to see why each letter changed

    Every letter gets a row: what went in, what came out, and the reason: “H shifted +3 → K”. A character a substitution cipher left alone reads “kept as-is”; rail fence names the rail it landed on instead; Morse marks what it drops; and A1Z26 and Playfair give a discarded character no row at all, which is itself the tell that it has gone.

The Steps Are the Point

Most cipher tools give you the answer; this one shows the work. Every letter gets a row in the steps table (what came in, what went out, and exactly why), so instead of trusting a black box you can watch a Caesar shift wrap Z around to C, see the Vigenère key advance letter by letter, or follow a keyword alphabet replace the ordinary one. Better yet, press play and it happens live: each letter of a shift cipher literally walks the alphabet to its target, one position at a time, at the pace you set on the slider, paused or stepped through whenever you want a closer look. Decoding a message you can explain beats decoding one you can’t.

Ten Ciphers, One Ladder

The set is ordered like a curriculum. Caesar teaches the idea of a shift; ROT13 shows the special case that undoes itself; Atbash mirrors the alphabet; A1Z26 turns letters into numbers; Morse swaps the alphabet for another one entirely; Vigenère introduces the concept that changed cryptography (a key), and keyword substitution shows how a single memorable word can scramble the whole alphabet. Then come the three that break the pattern: rail fence is a transposition: nothing is replaced, the letters just move; Playfair encrypts letters in pairs on a keyword grid, the trick that defeated simple frequency counting and served in two world wars; and pigpen abandons letters entirely for drawn symbols, the one every kid remembers. Everything runs in your browser; nothing you type is transmitted anywhere.

For Classrooms and Puzzle Makers

Code-breaking is a beloved classroom activity for a reason: it is spelling, pattern-matching, and logic wearing a trench coat. Put the steps table on the projector while the class cracks a message together, or flip it around and let students encode messages for each other. Planning a treasure hunt or escape room? The companion escape room cipher generator produces printable clue cards from any secret message. And a caution with a wink: these ciphers protected empires for centuries, but today they are toys. Use the password generator for anything that actually needs to stay secret.

Caesar cipher wheel: two concentric alphabet rings. The outer ring is the plaintext A–Z; the inner ring is the ciphertext at a shift of 3, so A maps to D, B to E, C to F, and so on around to Z mapping to C. The classic Caesar decoder disc.
The Caesar cipher wheel at shift 3: line up a plaintext letter on the outside to read its cipher letter inside. Save or print it.Download PNG

Crack a Caesar Without the Key

The Caesar cipher’s weakness is its greatest lesson: there are only 25 possible shifts, so you can simply try them all. Below, the ciphertext PHHW DW GDZQ is decoded under every shift: scan the column and one row snaps into English. This brute-force idea (and its big brother, frequency analysis: E is the most common English letter, so the most common ciphertext letter probably means E) is the first chapter of real cryptanalysis.

All 25 shifts of PHHW DW GDZQ, computed

Shift backResult
1OGGV CV FCYP
2NFFU BU EBXO
3MEET AT DAWN← readable!
4LDDS ZS CZVM
5KCCR YR BYUL
6JBBQ XQ AXTK
7IAAP WP ZWSJ
8HZZO VO YVRI
9GYYN UN XUQH
10FXXM TM WTPG
11EWWL SL VSOF
12DVVK RK URNE
13CUUJ QJ TQMD
14BTTI PI SPLC
15ASSH OH ROKB
16ZRRG NG QNJA
17YQQF MF PMIZ
18XPPE LE OLHY
19WOOD KD NKGX
20VNNC JC MJFW
21UMMB IB LIEV
22TLLA HA KHDU
23SKKZ GZ JGCT
24RJJY FY IFBS
25QIIX EX HEAR

Computed by the same Caesar function the tool runs. In a classroom, hand out a ciphertext and let teams race through the shifts.

Morse code chart (A–Z, 0–9)

CharacterMorse
0-----
1.----
2..---
3...--
4....-
5.....
6-....
7--...
8---..
9----.
A.-
B-...
C-.-.
D-..
E.
F..-.
G--.
H....
I..
J.---
K-.-
L.-..
M--
N-.
O---
P.--.
Q--.-
R.-.
S...
T-
U..-
V...-
W.--
X-..-
Y-.--
Z--..

The exact table the encoder uses. Letters are separated by spaces, words by a slash.

A1Z26 chart

LetterNumber
A1
B2
C3
D4
E5
F6
G7
H8
I9
J10
K11
L12
M13
N14
O15
P16
Q17
R18
S19
T20
U21
V22
W23
X24
Y25
Z26

A=1 through Z=26: the beginner cipher for treasure hunts.

The Pigpen Alphabet: Full Decoder Chart

Pigpen (also called the masonic or Freemason cipher) writes each letter as the shape of its cell: A–I sit in a tic-tac-toe grid, J–R in the same grid with a dot, S–V in an X, and W–Z in the X with a dot. To decode a symbol, find its shape below and read off the letter: this chart is the entire key. Print the page and every treasure hunter gets their own decoder.

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z

The ten ciphers at a glance

CipherHow it worksExample (shift 3 / key LEMON)
Caesar shiftEvery letter moves a fixed number of places down the alphabet.HELLO → KHOOR
ROT13Caesar with shift 13: encoding and decoding are the same move.HELLO → URYYB
AtbashThe alphabet mirrored: A↔Z, B↔Y, C↔X…HELLO → SVOOL
A1Z26 (numbers)Each letter becomes its position in the alphabet: A=1 … Z=26.HELLO → 8-5-12-12-15
Morse codeDots and dashes; letters separated by spaces, words by " / ".HELLO → .... . .-.. .-.. ---
VigenèreA keyword sets a different Caesar shift for every letter position.HELLO → SIXZB
Keyword substitutionA keyword builds a scrambled alphabet that replaces the normal one.HELLO → CNHHK
Rail fenceLetters zigzag across rails, then each rail is read left to right: a transposition, nothing is substituted.HELLO → HOELL
PlayfairLetters encrypt in PAIRS on a 5×5 keyword grid (I and J share a cell): the classic WWI field cipher.HELLO → RB MV EN
Pigpen (symbols)Each letter becomes the shape of its cell in four grids: the classic drawn secret alphabet. Decode with the chart.HELLO → drawn symbols (chart below)

Examples computed live by the same engine the tool runs, so they can never drift from the tool's actual behavior.

Frequently Asked Questions

How do I decode a Caesar cipher step by step?

Pick Caesar shift, set the shift value, paste the coded text, and switch to Decode. The steps table shows every letter moving back through the alphabet: H shifted −3 becomes E, and so on. Don’t know the shift? Try each of the 25 values; one of them will suddenly read as words.

Can I watch the cipher transform my message step by step?

Yes: press Play above the steps table and your message transforms one letter at a time, each step explained as it happens. For the shift ciphers (Caesar, ROT13, Vigenère) every letter even walks through the alphabet on its way, A becoming B becoming C becoming D, so you see the shift really is counting. A slider sets the pace, the “Animate letters” switch turns the walk off for instant flips, and the arrow buttons move one whole step forward or back. Works for all ten ciphers, including watching pigpen symbols get drawn one by one.

How do I identify which cipher I have?

Read the ciphertext’s surface: grid-and-dot symbols are pigpen (chart below), dots and dashes are Morse, numbers 1–26 are A1Z26, and normal letters mean a substitution or transposition. For letters, try Caesar first: step through the 25 shifts until words appear; if no shift works but letter frequencies look odd, suspect Vigenère (keyed); if the frequencies look like normal English scrambled, suspect rail fence (transposition). This tool lets you flip between all ten in two clicks, which is the fastest practical identifier.

Is a cipher translator the same as a cipher decoder?

Yes: “cipher translator”, “decoder”, and “solver” all mean turning coded text back into plain language. This page does both directions: Decode translates ciphertext back to English, Encode translates your message into the cipher, and the steps table shows its work either way.

How does the Vigenère cipher work?

A keyword repeats along your message, and each key letter sets that position’s Caesar shift: key letter A shifts 0, B shifts 1, and so on. The steps table shows the key letter and exact shift applied to every character: the textbook ATTACKATDAWN with key LEMON becomes LXFOPVEFRNHR, and you can watch each letter do it.

Is anything I type sent anywhere?

No. Every cipher runs in your browser: messages, keys, and results never touch a server. That makes it safe for classroom secrets and party games alike (but do not use classical ciphers for real security: all of them are breakable in seconds by modern methods).

Which cipher should a beginner start with?

Caesar is the gateway: one rule, instantly visible in the steps. Then Atbash (a mirror), A1Z26 (numbers), Morse (a different alphabet entirely), and finally Vigenère, the first cipher where a key genuinely matters, which is why it stayed “unbreakable” for three centuries.

How do I decode a pigpen cipher?

With the chart on this page: every pigpen symbol is the SHAPE of the cell its letter sits in. A–I live in a tic-tac-toe grid, J–R in the same grid with a dot, S–V in an X, W–Z in the X with a dot. Find the shape in the chart, read off the letter. To write pigpen, pick the Pigpen cipher above and the tool draws your message symbol by symbol.

How does the rail fence cipher work?

It’s a transposition: nothing is substituted, the letters just move. Writing zigzags down and up across N rails, then each rail is read left to right. The steps table shows which rail every character landed on, and decoding rebuilds the zigzag. With 3 rails, WEAREDISCOVEREDFLEEATONCE becomes WECRLTEERDSOEEFEAOCAIVDEN.

How does the Playfair cipher encrypt pairs of letters?

A keyword fills a 5×5 grid (I and J share a cell), and the message is split into letter PAIRS. Doubles get an X pushed between them. Same row: each letter moves one right. Same column: one down. Otherwise they form a rectangle and each takes the corner in its own row. Encrypting pairs instead of single letters is what defeated simple frequency counting for a century.

Can I use this to make an escape room or treasure hunt?

Yes: encode your clues here, or use the companion escape room cipher generator, which turns a secret message into printable clue cards with hints and an answer key (rail fence and Playfair included).

Cipher encoder showing ATTACK AT DAWN becoming LXFOPV EF RNHR with the Vigenère key LEMON and a step-by-step table explaining each letter
The textbook Vigenère example, live: every letter gets a row showing the key letter, the shift, and why.