Identify

Cipher Identifier

Paste a message you cannot read and CipherPad tells you what it probably is, and why. Every other tool here needs you to know the scheme first. This one does not.

Or try an example

Morse example, made by the Morse translator from “hello world”.

Most likely: Morse code

  1. Morse codeVery likely

    Every character is a dot, a dash, a space or a slash, and nothing else. That character set is unique to Morse: no other code on this site uses only two symbols plus separators.

    Open in the Morse code translator

How the identifier works

Identification happens in two passes, because two very different kinds of evidence are available and one is far more reliable than the other.

The first pass reads the character set and the structure. This is the strong evidence. If the text contains only dots, dashes, spaces and slashes, it is Morse code, because nothing else uses that alphabet. If every character sits in the Unicode range U+2800 to U+28FF it is braille. If the digits are all between 1 and 5 and there is an even number of them, they pair up as coordinates on a 5x5 grid, which means a Polybius square or tap code. Tap code written as dots looks like Morse at first glance, but it never uses a dash and its dots come in pairs of groups, a row and then a column. These tests do not care how long the text is, and they are close to conclusive when they fire.

The second pass only runs for text written in ordinary letters, where the character set gives nothing away, and it uses letter statistics. Two numbers do most of the work:

  • Index of coincidence. The probability that two letters drawn at random from the text are the same. English text sits near 0.067. A cipher that renames each letter consistently, such as Caesar or Atbash, leaves this untouched, so a value near 0.067 means a simple substitution. A cipher that enciphers the same letter differently in different positions, such as Vigenere, flattens it towards 0.038.
  • Chi-squared against English. How far the letter distribution sits from normal English. The identifier tries all 25 Caesar shifts and compares each result. If one shift scores several times better than leaving the text alone, that shift is almost certainly the key, and the identifier reports how much better it scored rather than simply asserting an answer.

When the index of coincidence is low, the identifier looks for the key length by splitting the text into columns and measuring the index of coincidence within each. At the correct key length every column is a plain Caesar shift, so the value jumps back up towards English. It corroborates that with a Kasiski examination, which looks for repeated three-letter sequences and the distances between them.

Where a scheme has a key, the identifier goes one step further and recovers it: the Caesar shift, the Vigenere keyword (each column solved as its own Caesar shift), the affine pair or the rail count. Every recovered key is checked by a second, independent test that the decoded text reads as English, and the Open in link carries the text and the key into the translator, already set to decode.

How much text each test needs

Character-set tests work on a single word. Statistical tests need enough letters for the counts to settle, and below that the identifier lowers its confidence or stays silent rather than guess. Each candidate in the results repeats the minimum that applies to it. These are the thresholds the code uses.

Minimum input for each test the identifier runs
TestUsed forMinimum
Character setMorse, braille, binary, Base64, Bacon, A1Z26, Polybius, tap codeAny length. Base64 needs 4 characters, Bacon 5 symbols, A1Z26 2 numbers, Polybius 4 digits and tap code 2 letters
Word listsNATO phonetic, Pig Latin2 words
Letter frequencies (index of coincidence, chi-squared)Caesar, ROT13, Atbash, transposition, plain EnglishRuns from 12 letters, full confidence from 30
Key length (index of coincidence per column, Kasiski)Vigenere, Playfair20 letters
Vigenere keyword recoveryThe keyword carried to the Vigenere translator60 letters
Affine key searchAffine, and Atbash as its a = 25, b = 25 case40 letters
Rail count searchRail fence30 letters

Worked examples

The example buttons above load these messages. Each one was made by the matching translator on this site, and the last column is what the identifier says about it.

Example messages and what the identifier finds
SchemeMade fromMessageIdentified as
Morse“hello world”.... . .-.. .-.. --- / .-- --- .-. .-.. -..Morse code
Braille“meet at noon”⠍⠑⠑⠞ ⠁⠞ ⠝⠕⠕⠝Braille
Binary“Hello”01001000 01100101 01101100 01101100 01101111Binary (ASCII)
Base64“Meet me at noon”TWVldCBtZSBhdCBub29uBase64
Caesar“there is a meeting in the old library tomorrow evening and everyone should attend” with shift 7aolyl pz h tllapun pu aol vsk spiyhyf avtvyyvd lclupun huk lclyfvul zovbsk haalukCaesar cipher (shift 7)
Vigenere“the map is hidden behind the clock in the old station and the second half of the code is written on the back of the ticket in the drawer” with keyword LEMONelq ana me vvohqb oplubq elq qyzgw wa elq cyo wfogtsz oao xts fpgabq sext bq xts pzhq wf hvuhgpr ab gsi nopv sr hup xuqxpx ub gsi pfnhidVigenere cipher (keyword LEMON)
A1Z26“secret”19-5-3-18-5-20A1Z26 (letter numbers)
Tap code“water”..... .. . . .... .... . ..... .... ..Tap code

How to recognise each code by hand

The identifier is only automating what you can do by eye. This is the whole table it works from, so you can do it yourself, and so you know what it is looking at.

How to recognise each cipher and code from the text alone
Code or cipherCharacters you will seeThe giveaway
Morse code. - / and spacesOnly two symbols plus separators. Nothing else looks like this.
BrailleU+2800 to U+28FFIts own Unicode block of raised-dot patterns.
Binary0 and 1Total bit count divides by 8 (or 7 for older ASCII).
Base64A-Z a-z 0-9 + / =Length divides by 4 and it often ends in one or two = signs.
Bacon cipherA and B onlyLetter count divides exactly by 5.
A1Z26Numbers with separatorsEvery number lands between 1 and 26.
Polybius / tap codeDigits 1 to 5Even count of digits, none above 5: they pair as grid coordinates.
Tap code (dots). / and spaces, no dashesGroups of one to five dots in pairs, row then column, and never a dash.
NATO phoneticWhole wordsWords are Alfa, Bravo, Charlie and the rest of the code word list.
Pig LatinOrdinary lettersMost words end in ay, way or yay.
LeetspeakLetters with digits mixed inDigits 4, 3, 1, 0, 7 sit inside words in place of letters.
Caesar cipherLettersIndex of coincidence near 0.067, and one of the 25 shifts reads as English.
ROT13LettersSame as Caesar, but the shift that works is exactly 13.
AtbashLettersIndex of coincidence near English, but no Caesar shift works: a fixed substitution.
Affine cipherLettersLike Atbash, but one multiply-then-shift key (a, b) turns it back into English.
VigenereLettersIndex of coincidence near 0.038. Repeated sequences reveal the key length.
PlayfairLetters, no JFlat frequencies, even length, and the letter J never appears.
Rail fenceLettersExactly English letter frequencies, but unreadable: the letters were reordered, not replaced.

What it cannot do

It is worth being straight about the limits, because a confident wrong answer is worse than no answer.

  • Short text defeats statistics. Under about 30 letters the counts are too noisy to separate a substitution from a transposition. The identifier lowers its confidence and says the text is short rather than pretending otherwise.
  • Layered schemes read as the outer layer. Text that was enciphered and then Base64 encoded will be identified as Base64, which is correct but only the first step. Decode that layer and paste the result back in.
  • Some schemes are indistinguishable from the text alone. Written as digits, a Polybius square and tap code use the same grid and produce identical output, so they are reported together. That is a real ambiguity, not a gap in the tool.
  • Non-English plaintext skews everything. The frequency tables here are English. A Caesar cipher over German or Spanish will often still be spotted, but the reported shift may be wrong.

Frequently asked questions

What cipher is this?

Paste the text into the box above and the identifier ranks the most likely schemes, with the reason for each one. It reads the character set first (only dots and dashes means Morse, only ones and zeroes means binary, digits 1 to 5 in pairs means a Polybius grid), then falls back to letter statistics for anything written in ordinary letters.

How does it tell a Caesar cipher from a Vigenere cipher?

By the index of coincidence, which is the chance that two letters picked at random from the text are the same. English sits near 0.067. A Caesar cipher just renames the letters, so it keeps that value. A Vigenere cipher enciphers the same letter differently in different places, which flattens the value towards 0.038. A number near 0.067 means a simple substitution, and a number near 0.038 means a polyalphabetic one.

Can it break the cipher as well as name it?

For many, yes. Where a scheme has no key, naming it is the same as breaking it. Where it has one, the identifier recovers it when there is enough text: the shift of a Caesar cipher, the keyword of a Vigenere cipher, the two numbers of an affine cipher and the rail count of a rail fence. The Open in link then carries your text and that key into the translator, already set to decode.

Why does it say the text is too short?

Frequency analysis is statistics, and statistics need data. Under about 30 letters, a single unusual word can skew the counts enough to point at the wrong answer, so the identifier lowers its confidence, says so instead of guessing, and shows how many letters each test needs. Structural matches such as Morse or braille work on any length, because they depend on the character set rather than on counting.

Does the text I paste get uploaded?

No. The identifier runs entirely in your browser, like every other tool on CipherPad. Nothing you paste is sent to a server, logged or stored. Open your browser's Network tab while you type and you will see no requests at all.

It named the cipher, so is my message secure?

No, and that is rather the point. If a page of JavaScript can name the scheme from the text alone in a few milliseconds, the scheme is not protecting anything. Every cipher on this site is a puzzle or a teaching tool. For real protection use modern cryptography such as the Web Crypto API.

Once you know what it is

Every candidate above opens the translator that decodes it, with your text and any key it found already filled in. If you would rather browse, the full list of translators covers every scheme on the site, and the list of every type of cipher and code has the complete charts for Morse, braille, binary, NATO, pigpen and Polybius on a single printable page.