thoughtasylumTOOLBOX Preview

Tools › Ciphers

Cipher Cracker

Paste a ciphertext and it tries every Caesar, Affine and Atbash key, finds likely Vigenère and Beaufort keys, and tries Rail Fence, with the most English results first; on request it also solves keyword substitutions (cryptograms) and columnar transpositions.

About this tool What it's for, how to use it and an example

What it's for

Find the plain text of a ciphertext when you don’t know the key, and often when you don’t know the cipher. It tries every key of the simple ciphers, works out the likeliest keys of the polyalphabetic ones, and lists the results that look most like English.

For example, when a puzzle hands you a paragraph of gibberish with no other clue, paste it here before trying anything by hand.

How to use it

Paste the ciphertext; results appear as you type. It tries every Caesar shift and Affine key (which include Atbash), Vigenère and Beaufort with the four likeliest key lengths, and Rail Fence with 2 to 10 rails. The twelve most English-looking results are listed, best first, each with its cipher and key and a Copy button.

The line above the results gives the index of coincidence: about 0.067 for English or English rearranged, about 0.038 for random letters. A high value points to a single substitution or a transposition, a low one to a polyalphabetic cipher such as Vigenère, and then the likeliest key lengths are listed too.

Try substitution and columnar transposition runs two slower attacks: it solves a keyword substitution (any scrambled alphabet, the commonest puzzle cipher) by repeatedly swapping letters and keeping whatever reads more like English, and tries every column order of a columnar transposition up to 7 columns, and a search up to 10. It shows the best of each, with the alphabet or key it found. Leave the spaces between words in if the puzzle has them: the substitution attack then also checks the words against a dictionary, which makes it far more reliable.

Example

Paste this:

Lb ykw gzh jgcx bx wqoow, vl ziu dlr orzud ss llugc, mg oda vri nyh wh gmfvru, kd ank wpg kkr gi nqypvkkvgcw, vl ziu dlr wswer ss thtkoj, vl ziu dlr wswer ss aqktohhdlba.

The top result is Vigenère, key DICKENS: It was the best of times, it was the worst of times…

Good to know

Results are judged as English, so text in another language may rank wrongly. Vigenère and Beaufort need enough text: roughly 25 letters for every letter of the key, so a short message with a long key may not be found. Keys up to 20 letters are tried. The substitution attack needs about 100 letters to be reliable; with fewer it gets most letters right and the rest can be fixed by eye. The columnar attack works on letters only. Playfair, the fractionating ciphers and Enigma aren’t attempted; use Classical Ciphers once you have a guess at the key.

Guide: Solving an unknown cipher

Slower attacks

Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.

Saved you a few minutes? Say thanks with a coffee.

Something wrong with this tool, or missing from it? Report a bug or suggest a feature.

↑ ↓ move↵ openesc close