Cipher Tools

Loading…

Twenty classical ciphers, and the tools to break them

Every cipher here can be run in both directions, and eight of them can be run without the key at all: the Caesar shift lays out all twenty-six possibilities, the Vigenère solver finds the key length and then the key, the affine cipher tries all three hundred and twelve of its keys, and the XOR tool tries all two hundred and fifty-six single bytes. That is what these tools are usually wanted for — somebody has a message and does not have the key.

None of them protects anything, and every one of them says so on the result. They are puzzles, teaching aids and historical curiosities: a laptop breaks any of them in less time than it takes to type the key. What they are good for is escape rooms, cryptograms, a cryptography course, and reading the sequence of numbers somebody left in a geocache.

Everything runs inside this browser tab, compiled to WebAssembly. There is no server to send anything to, and none of the tools makes a network request while it works.

Shifting the alphabet

ROT13
Move every letter thirteen places, which both hides and reveals. ROT5 and ROT47 too.

Caesar cipher
Shift the alphabet by any amount, or see all twenty-six shifts at once and pick the readable one.

Affine cipher
Multiply and then add, with the tool checking that the key can be undone and saying why when it cannot.

Vigenère cipher
Encipher with a keyword, or hand it a ciphertext and let it work out the key length and the key.

Replacing letters

Atbash cipher
Mirror the alphabet: the first letter becomes the last, and doing it again gives the text back.

Substitution cipher
Give the alphabet any order you like, or let letter frequencies suggest one to start from.

A1Z26
Letters as their position in the alphabet, and numbers read back even when nothing separated them.

Bacon cipher
Five of two symbols per letter — and a message that can hide in the capitals of an innocent text.

Grids and coordinates

Polybius square
Every letter as a pair of coordinates in a five-by-five square you can key yourself.

Playfair cipher
Encipher letters in pairs by the rectangle they make in the square, and see which rule moved each one.

Tap code
Letters as two runs of taps on a wall, written in dots or numbers and read back either way.

Rail fence cipher
Write the message in a zigzag and read it off by rows — or try every height at once to read it back.

Keys from outside the message

XOR cipher
Exclusive-or bytes against a repeating key, in hex or Base64 — and try all two hundred and fifty-six single-byte keys.

One-time pad
The one cipher that cannot be broken — as long as the key is random, as long as the message, and never used twice.

Book cipher
Write a message as numbers pointing into a text both sides already have, and read it back.

Enigma machine
Rotors, ring settings, reflector and plugboard, wired as they were — double step and all.

Drawn and signalled

Pigpen cipher
Each letter drawn as the walls of the box it sits in, as a picture you can print or trace.

Semaphore alphabet
Text as a row of flag signallers, with the numerals sign, the space and the cancel — and read back from the positions.

Looking at a cipher

Frequency analysis
Letters, pairs, triples, the index of coincidence and Kasiski’s test — the five counts every attack starts with.

Hash identifier
What that string of hex probably is, with the cracker mode numbers and the parameters read out of the format.

Questions

Can I use these to keep something secret?
No, and every tool here says so on its own result. These are the ciphers of puzzle books and cryptography courses; all of them were broken before computers existed, and a laptop breaks any of them in seconds. The one exception is the one-time pad, which is unbreakable only while its key is truly random, as long as the message, and used exactly once — and this site cannot help you with the hardest of those, which is getting the key to the other person.
I have a message and no key. Can these read it?
Often, yes. The Caesar cipher shows all twenty-six shifts at once and names the likeliest; the affine and XOR tools try every key they have; the Vigenère tool finds the key length from the index of coincidence and then the key from each column's letter frequencies. Start with the frequency analysis if you do not know which cipher you are holding: the index of coincidence tells a substitution from a polyalphabetic cipher before any key is guessed.
Is my text uploaded anywhere?
No. The tools are compiled to WebAssembly and run inside the browser tab. Nothing you paste is sent to a server, and you can watch your browser's network panel while you use one to see that nothing leaves the page.
Can I use them in my own language?
The interface is in thirteen: English, German, Spanish, French, Portuguese, Italian, Russian, Ukrainian, Turkish, Polish, Czech, Slovak and Hungarian. It starts in whichever one your browser asks for, and there is a picker at the bottom of every tool. Several of the ciphers also work over a Slovak or Greek alphabet, or over one you type in yourself.