Morse Code Translator
  1. Translator
  2. Tap code

Tap code: talking through walls

Tap code sends letters as two counts of knocks: the row and column of a five-by-five square, with C standing for K. American POWs used it through prison walls in North Vietnam; it is a separate system from Morse code.

In short. Tap code sends a letter as two groups of identical knocks: count its row in a five-by-five square, pause, then count its column. C and K share a cell. American prisoners of war used it to communicate in North Vietnam; it is a different alphabet from Morse code (US Air Force, 2015), (US Air Force, 2020).

Tap code translator

Type a message to see its tap code, or switch direction and enter the counts you heard. Each letter is two groups of knocks, its row and then its column, in the square on this page. Listen plays the knocks and Flash blinks the lamp. Nothing makes a sound until you press a button, and everything stays on this device: nothing you type is sent anywhere.

This translator needs JavaScript. Without it, look the letters up in the square below.

It reads the letters in the square, up to 300 at a time, and sends K as C. Digits, punctuation and other alphabets are skipped, and a decoded C may really be a K. The pauses in Listen and Flash are a practice convention, not a historical timing standard.

Polybius square translator

Use this Polybius square converter to turn text into row-column pairs, or read pairs back as text. Choose the classic 5×5 alphabet with I/J combined, or the tap-code square with C/K combined. A decoded I may mean J; a decoded C in tap mode may mean K. The I/J convention also appears in Central Washington University's Polybius square instructions.

In Polybius's Histories, X.45–47, hosted by the University of Chicago, two sets of torch signals identify an alphabet division and a letter's position in it. The modern English I/J square below is a different alphabet arrangement from that ancient Greek signaling scheme.

Both new tools run in your browser; your text and taps stay on this device.

Enable JavaScript to use the Polybius square cipher translator. You can still read coordinates from this square.

Classic Polybius square: row first, column second; I/J share a cell
Row / col12345
1ABCDE
2FGHI/JK
3LMNOP
4QRSTU
5VWXYZ

Highlighted cells mark every letter in your result.

Up to 300 letters or pairs and 2000 input characters. This converter offers either unkeyed square through the Square menu. It does not solve keyed squares or recover which letter was meant in a shared cell.

Tap code decoder: tap the timing

Tap the button, or focus it and tap Space or Enter. Send the row count, pause, then send the column count. Leave a longer pause between letters and words. This reads button and key taps only; it does not use a microphone or read recordings.

Enable JavaScript to decode your taps. Without it, count each row-column pair and use the tap-code square above.

These thresholds are practice settings, not a historical timing standard. Adjust them to your pace; changing them rereads all your taps. C/K share a cell and decode as C. Extra or missing taps can produce a different letter without an error. A count over five, an extra group or an unfinished pair is marked ?. Up to 4,000 taps per session; clear taps to start again.

What could get through a prison wall?

A US Air Force account identifies Carlyle “Smitty” Harris as a prisoner who remembered the system from an instructor at escape and evasion school. Harris was shot down over Vietnam on 4 April 1965. He taught the code to other POWs, and it spread through the prison. The account describes two-number letter coordinates, explicitly distinguishing them from Morse (Harris account, 2020).

John “Spike” Nasmyth remembered hearing taps when he entered solitary confinement. At first he did not understand them. Other American prisoners taught him the arrangement: five lines of letters, no separate K, row first and position within the row second. Soon he was part of a communications network that passed messages through the camp (Nasmyth's account, section Remember — no k).

Those messages carried more than conversation. In a later account, retired Navy commander Porter Halyburton described tap code as a way for senior officers to send guidance and commands. He also recalled using the system for classes, exercise programs and games. Communication was prohibited, and prisoners faced brutal punishment for speaking to one another (US Marine Corps, 2024).

Think of the wall as a very limited channel: the next cell can receive a series of knocks. The practical question is how to give each series an unambiguous meaning. Tap code answers that question with a coordinate in a shared square.

Read the five-by-five square

The square has 25 cells for the alphabet's 26 letters, so giving C and K one position lets the alphabet fit. Start in alphabetical order and omit K from its separate place; K uses C's position instead. The National Veterans Memorial and Museum teaches the system with the row first and the column second (museum activity, Explain the Tap Code Grid).

Tap-code square: count the row first, then the column; K uses C
Row / column12345
1ABC / KDE
2FGHIJ
3LMNOP
4QRSTU
5VWXYZ
Tap code chart showing the five by five square with shared C and K and row and column numbers.
Tap code square: row first, then column

Open the chart to print or save it

For H, find row 2, column 3. Send 2 knocks, pause, then 3 knocks. For E, send 1, pause, then 5. The numbers above come directly from the square. They describe two counts, not a number spoken aloud.

The museum suggests remembering the first letter of each row: A, F, L, Q, V. Count across from that starting letter and remember to skip K (museum grid instructions).

Send HELLO one letter at a time

  1. Agree on this square. Show your partner where C and K share a position before you begin.
  2. Send the row, then the column. HELLO starts with H: 2, 3.
  3. Separate the pairs. For this practice exercise, leave a longer pause after a complete letter than between its two counts.
  4. Keep both L's. Each is 3, 1. Send the pair twice, with a letter pause between them.
  5. End with O. Its pair is 3, 4. Pause before starting another word.

These pause instructions are a practice convention, not a claim about a fixed historical timing standard. Begin with your partner watching the square, then try a letter with the chart covered. If the answer differs, compare the row and column separately before trying a longer message.

For a decoding exercise, write the pairs first. HELLO is 2, 3; 1, 5; 3, 1; 3, 1; 3, 4. Keep each pair together as you look it up. A single unbroken count would discard the boundary between row and column.

How do you decode tap code numbers?

Split the numbers into pairs, read the first number of each pair as the row and the second as the column, then look the cell up in the square above. Every count is from 1 to 5, so a string of digits can only be cut into pairs one way.

Take 22 12 45. The first pair is row 2, column 2, which is G. The next pairs give B and U. Read as knocks, that is 2, 2; 1, 2; 4, 5. Prisoners used GBU, for “God Bless You”, as a sign-off (PBS American Experience).

The cell for C is also the cell for K, so decide from the word around it. For a recording of knocks, write one number for each burst, using the pauses you agreed on, and decode the pairs the same way.

Is tap code a Polybius square?

It is based on one: the National Veterans Memorial and Museum says the tap code “is based on the Polybius Square” (NVMM, The Vietnam Tap Code). The museum adds that the ancient Greek historian Polybius recorded one of the first mentions of knock codes. Is Morse code a cipher? explains the difference between a code and a cipher.

To compare another grid-based way to represent letters, read the pigpen cipher guide.

How did prisoners mark sentences and start a conversation?

They used X to end a sentence. The museum says X served as the period or separated sentences (NVMM), and PBS says the same (PBS). To ask for a conversation, a prisoner knocked the opening of the “Shave and a Haircut” jingle and waited for the last two knocks as the reply (NVMM). Time pressure also produced abbreviations; a prisoner named Stockdale recalled ST for “sleep tight” (PBS).

Why does this suit knocking better than Morse?

Morse distinguishes short and long signals. The international standard makes a dash three times the duration of a dot (ITU-R M.1677-1, section 2). Holding your knuckle against a wall after a knock does not sustain its sound. Tap code avoids asking the receiver to hear a long knock: the information is in the two counts. That is a practical consequence of the two systems, rather than a measured claim that one is always easier to learn.

For example, tap-code K is the C cell, 1, 3. Morse K is , while Morse C is . They remain different letters in the international alphabet (ITU, Annex 1, letter table).

Tap counts and Morse signal counts, calculated from the two alphabets; pauses are excluded
TextTap-code row, column pairsKnocksMorse codeMorse signals
A1, 12.-2
K1, 34-.-3
HI2, 3; 2, 411.... ..6
HELLO2, 3; 1, 5; 3, 1; 3, 1; 3, 426.... . .-.. .-.. ---16

HELLO takes 26 knocks in this square and 16 Morse signals. That does not establish a speed ratio: a Morse dash lasts longer than a dot, and both systems need pauses. The table counts events, not seconds. Use the Morse code alphabet to compare the actual patterns.

To compare Morse with a different dot system, read Morse code vs Braille.

The player below sends HI in Morse code. It does not play the row-and-column tap code. Listen for the two separate character rhythms as a comparison.

Morse comparison only: H followed by I. The tap-code square uses different counts.

For ways to preserve Morse's short and long signals when tapping, read how to tap Morse code.

Try both alphabets

To explore the other alphabet, open HI in the Morse code translator. If you want to recognize Morse as it arrives, learning Morse code by ear is a separate next step. Keep the square beside you for tap code, and choose which system you and your partner will use before sending.

Morse code with hands, whistle or horn covers sending Morse with held hand signals and whistle sounds. A different signal from a prisoner in North Vietnam used Morse code. On 2 May 1966, Jeremiah Denton blinked the word “T-O-R-T-U-R-E” while speaking on camera (National Archives, DocsTeach). Jeremiah Denton's blinked Morse code tells that story.

Compare HI in the Morse translator

Sources

  1. Tap Code: Former POW, wife connect with Columbus AFB Airmen. DVIDS, 14th Flying Training Wing, US Air Force, 23 January 2020.
  2. Optimism helped Vietnam vet survive as POW, Karen Abeyasekere. US Air Force, 100th Air Refueling Wing Public Affairs, via Air Reserve Personnel Center, 20 July 2015.
  3. Living Without Hate – The Porter Halyburton Story, Cpl. Zeta Johnson. DVIDS, Marine Corps Installations East, 13 February 2024; posted 5 March 2024.
  4. The Vietnam Tap Code. National Veterans Memorial and Museum, 29 September 2022.
  5. Recommendation ITU-R M.1677-1, International Morse code. ITU Radiocommunication Sector, October 2009.
  6. The Tap Code. American Experience, PBS (WGBH Educational Foundation), checked 11 November 2026.
  7. U.S. Navy Commander Jeremiah A. Denton, Jr. (photograph, National Archives Identifier 849123, with description). National Archives, DocsTeach, checked 6 November 2026.
  8. Polybius, Histories, Book X, 45–47 (Loeb translation, 1925). University of Chicago, Bill Thayer's LacusCurtius, checked 11 November 2026.
  9. Phillips cipher: Polybius square setup, step 2. Central Washington University, checked 11 November 2026.