Tap Code Translator: Encode & Decode Knock Code
Convert text to tap code (knock code) and back. The secret communication method used by prisoners and POWs. Listen to tap sounds and practice decoding.
Characters: 0
Characters: 0
Frequently Asked Questions
What is tap code?
Tap code is a simple encoding system that uses a 5×5 grid to represent letters as pairs of taps. Each letter is encoded as two groups of taps: the first group indicates the row, and the second indicates the column. It was widely used by prisoners of war to communicate through walls.
Why is the letter K missing from tap code?
The standard 5×5 grid only has 25 cells, but there are 26 letters. To solve this, K is merged with C. Whenever you want to tap K, you use C instead. The meaning is understood from context.
How was tap code used in the Vietnam War?
American POWs held in the Hanoi Hilton prison used tap code to communicate between cells by tapping on walls. They organized resistance, shared information, and maintained morale through this system, even under harsh conditions where speaking was forbidden.
What is the difference between tap code and Morse code?
Morse code uses variable-length sequences of dots and dashes, while tap code uses fixed-length pairs of tap groups from a 5×5 grid. Morse requires distinguishing between short and long signals, while tap code only requires counting identical taps, making it easier to use in noisy environments.
What Is Tap Code and Its History
Tap code, also called knock code, is a simple encoding system that represents each letter of the alphabet as a pair of tap groups using a 5×5 Polybius square grid. It gained worldwide fame during the Vietnam War, when American prisoners of war held in the Hanoi Hilton prison used it to communicate between cells by tapping on walls. The system allowed POWs to share intelligence, organize resistance, and maintain morale even when speaking was forbidden. The code dates back further to 19th-century prison communication and has roots in ancient Greek cryptography.
How the 5×5 Polybius Square Works
The tap code grid arranges 25 letters in a 5×5 matrix numbered 1–5 for both rows and columns. Since the English alphabet has 26 letters but the grid only holds 25, the letter K is merged with C. Each letter is encoded as two groups of taps: the first group indicates the row number, the second indicates the column. For example, the letter H is at row 2, column 3, so it is tapped as two taps, a pause, then three taps. This makes the system remarkably simple to learn and use without any equipment.
Prisoner Communication Through Walls
In the Hanoi Hilton and other POW camps, prisoners developed sophisticated communication networks using tap code. They would tap on shared walls, water pipes, or any solid surface. The system was taught covertly from cell to cell, creating an underground communication network. Guards struggled to suppress it because the tapping sounds were subtle and could be disguised as casual activity. POWs transmitted entire messages, abbreviations, and even jokes through this method, maintaining human connection in extreme isolation.
Tap Code vs. Morse Code
While both tap code and Morse code are systems for encoding text, they differ fundamentally in design. Morse code uses variable-length sequences of dots (short signals) and dashes (long signals), requiring the listener to distinguish between two different signal types. Tap code uses only identical taps organized into counted groups, making it easier to use in noisy environments or when the communication channel doesn't support varying signal lengths. Morse code is more efficient for electronic transmission, while tap code excels in physical, low-tech scenarios.
Modern Uses of Tap Code
Today, tap code appears in escape rooms and puzzle games as a popular cipher challenge. Military and survival training programs still teach it as a backup communication method. It is used in educational settings to teach cryptography fundamentals and the Polybius square concept. The simplicity of tap code makes it valuable for any situation where only a single binary signal (tap or no tap) is available, from survival scenarios to creative team-building exercises.