StringMash.com

Cryptogram solver

Paste the puzzle, fix the letters you're sure of, and let it find the rest.

Type a letter under any cipher letter to fix it. Solve keeps the ones you typed.

Using it

Paste the puzzle into the top box. A row of small boxes appears, one for each letter used in it, and the decryption below shows a blank for every letter not yet worked out. Press Solve and the boxes fill in as the search runs, which takes a second or two on a phone.

If you already know some letters, from a hint in the newspaper or because you've spotted a word, type them in their boxes before pressing Solve. Typed letters turn bold and are never changed. When the answer is nearly right, fix the one wrong letter the same way and solve again. Typing a letter that's already used under another box moves it, since each plain letter stands for only one cipher letter.

How it solves

A puzzle cryptogram is a simple substitution cipher, so solving it means finding the one letter swap that turns the puzzle into English. The solver starts from a random key and keeps trying small changes, swapping what two letters stand for or fitting a whole cipher word to a real word with the same pattern of repeated letters. A change is kept when the result reads more like English. Now and then a worse change is kept too, so the search doesn't get stuck, and it starts afresh 30 times and keeps the best key it found.

Two scores decide what reads like English. One counts how often each run of four letters appears in ordinary text, the same statistics the substitution cipher page uses. The other checks whole words against a list of 20,459 words, with how often each appears in 23 public-domain books from Project Gutenberg. Short puzzles have too few letters for the four-letter score alone, and the word score is what pulls them into place.

When it gets a word wrong

Some short puzzles have more than one answer that reads well. If only one word in the puzzle has a B and that word could be BE or WE, nothing in the rest of the text says which. The solver picks the commoner word, and you can type the other letter if the sense calls for it.

Names and rare words aren't on the list, so the status line counts the words it doesn't know. When a puzzle is a quotation with the speaker's name at the end, the name is often the word it can't place. The letters around it are usually right, and typing one or two letters of the name is enough to finish it.

Questions

Is my puzzle sent anywhere?

No. The letter and word statistics are downloaded once when you first press Solve, and the solving happens on your device. The puzzle itself never leaves the page.

Why is no letter allowed to stand for itself?

Puzzle cryptograms are usually made so that no letter is left as itself, and that's a useful clue, since it rules out a lot of keys. The puzzles on this site follow the rule too. Untick the box for a puzzle made without it, and the solver will let a letter stay unchanged.

Does it work on other ciphers?

Only on ciphers where each letter is always replaced by the same other letter, which covers puzzle cryptograms, keyword ciphers, Atbash and Caesar shifts. For a Vigenère cipher or one that moves letters around, try the cipher identifier first.

Does it keep the spaces and punctuation?

Yes. Spaces, punctuation and digits are copied across as they are, and the word breaks are a big help to the solver. With the spaces taken out, it falls back on the four-letter score and needs a longer text.

Sources

Added and reviewed . What's new