Cipher
Tap Code Translator
Tap code, also called the knock code, spells letters as pairs of taps on a 5 by 5 grid. Prisoners of war famously used it to communicate through walls. Type text to encode, or paste taps to decode.
..... .. . . .... .... . ..... .... ..
It folds K into C to fit the alphabet into 25 cells. The whole thing runs in your browser.
How the Tap Code works
The 25 letters sit in a 5 by 5 grid (K uses the same cell as C). Each letter is sent as two groups of taps: first the row number, then the column number.
So a letter in row 2, column 3 is tap-tap, pause, tap-tap-tap. This tool shows the taps as dots, with clear spacing between each letter.
Examples
Tap code and the Polybius square are the same grid
Tap code and the Polybius square produce identical output, because they use the same 5x5 grid with I and J sharing a cell. A message encoded here will decode on the Polybius page and the other way round. That is not duplication, it is the same idea used for two different purposes.
The Polybius square is a written system: coordinates on a page. Tap code is that same grid delivered as sound, and the difference is entirely in the channel. Each letter is two groups of taps with a pause between them, so C is one tap, pause, three taps.
That channel is why it matters historically. Tap code spread among American prisoners of war in Vietnam, where it could be tapped on a cell wall, coughed, or scraped with a broom in situations where writing anything was impossible. Its virtue is that it needs no equipment and no light, and that both people can memorise the grid in an afternoon. Its total lack of secrecy was beside the point: the guards were not doing cryptanalysis, they were trying to stop communication happening at all.
The one thing worth knowing if you are actually tapping it: the letter K is normally sent as C, because K is the letter dropped to fit twenty-five cells in some versions of the grid. This tool follows the more common convention of merging I and J instead.
History and origins
Tap code is built on the ancient Polybius square. It became widely known through American prisoners of war in Vietnam, who tapped messages between cells to keep morale and organisation alive.
Its power is that it needs nothing but a wall and a way to make a sound, making it usable when every other channel is cut off.
Frequently asked questions
Why does tap code skip the letter K?
A 5 by 5 grid holds only 25 letters, so K shares a cell with C. Readers infer from context whether a C-cell means C or K, which is rarely ambiguous.
How do you read tap code?
Count the first burst of taps for the row and the second burst for the column, then find that cell in the 5 by 5 grid. This tool decodes it for you automatically.
Learn more
Go deeper on the ideas behind this tool.
Not sure this is the right tool?
If you have a message and you are not certain what it is, the cipher identifier reads the character set and the letter statistics and tells you which scheme it most likely uses, and why. It covers every code and cipher on this site.