StringMash.com

Tap code translator

Two runs of taps per letter, one for the row and one for the column.

Conversion
13 characters
Updates as you type
Row taps, then column taps

Using the tap code tool

Type on the left and the taps appear on the right. Each letter comes out as two runs of dots with a small gap between them, and a wider gap before the next letter.

Write taps as switches the output to bare numbers, so C reads 1,3 instead of a row of dots. Both notations decode, so you can paste either one back in.

Reading the square

The alphabet sits in a 5x5 grid. The first run of taps counts down to the row, the second counts across to the column. A is 1 and 1, so it's one tap, pause, one tap. Z is five and five.

K has no cell. Twenty-six letters don't fit in 25 squares, and dropping K costs almost nothing in English, so a K is tapped as C and the reader works it out. This is the one place the tap code differs from a plain Polybius square, which merges I and J instead.

25 LETTERS

Every letter as taps

A. .
B. ..
C. ...
D. ....
E. .....
F.. .
G.. ..
H.. ...
I.. ....
J.. .....
L... .
M... ..
N... ...
O... ....
P... .....
Q.... .
R.... ..
S.... ...
T.... ....
U.... .....
V..... .
W..... ..
X..... ...
Y..... ....
Z..... .....

Hoa Lo Prison, 1965

Four American prisoners taught it to each other in the Hoa Lo Prison in Hanoi in June 1965. Carlyle Harris had heard about the code from an instructor during training, who had mentioned it as a piece of Second World War trivia. Harris passed it to Phillip Butler, Robert Peel and Robert Shumaker, and it spread through the camp by wall and by broom handle.

Prisoners were held in isolation and beaten for communicating. The code worked because it needed nothing: no paper, no light, no shared language beyond the grid. Men tapped through walls, coughed it, swept it, and wrung it into laundry.

James Stockdale, the senior officer there, later wrote that the sound of tapping was what told a new prisoner he wasn't alone. The code carried names, so the camp kept a roster of who was alive. That roster is the reason some families learned their relatives had survived.

Related conversions

Morse code solves the same problem with one channel instead of two, at the cost of a code book you have to memorise. Tap code needs only a 5x5 grid you can reconstruct from scratch.

A1Z26 also turns letters into numbers, but it counts along the alphabet rather than across a grid.

Questions

What is tap code?

A way of spelling letters with two runs of taps, one for the row of a 5x5 grid and one for the column. It needs no equipment and can be heard through a wall.

Why is there no K in tap code?

The grid holds 25 letters and the alphabet has 26. K is dropped and tapped as C, which reads clearly enough in English.

How do you tap a space between words?

Most users didn't. Word breaks were left to the reader, and practised prisoners used a longer pause or a double tap to mark the end of a word.

Is tap code the same as Morse?

No. Morse uses two different lengths of signal, so it needs a way to tell a dot from a dash. Tap code uses only one kind of tap and counts them instead.