Guide
Tap code and the Polybius square: letters as coordinates
Tap code and the Polybius square turn each letter into two numbers: its row and its column in a 5×5 grid of letters. Written down, “hello” becomes 23 15 31 31 34. Knocked on a wall or pipe, each number becomes a series of taps. This tool converts text both ways, writes numbers or dots, and can knock the code aloud.
Tap code
The tap code grid lists the alphabet in five rows: A–E, F–J, L–P, Q–U and V–Z, with K left out and sent as C. To send a letter, tap the row number, pause, then tap the column number. H is in row 2, column 3: tap tap, pause, tap tap tap. The code is easy to learn and needs no equipment, which is why American prisoners of war used it in North Vietnam to communicate between cells for years. Choose dots to write it as it is tapped, or numbers for a compact written form.
Listening to the knocks
The Knock button plays the code with short, sharp sounds: taps within a number close together, a pause between row and column, and a longer pause between letters and words. It is a good way to practise recognising letters by ear, as the code was really used.
The Polybius square
The Greek historian Polybius described a similar grid around 150 BC for signalling with torches. Its standard form merges I and J in one cell, so K keeps its own place. Adding a keyword fills the square with the keyword’s letters first, then the rest of the alphabet, which turns the square into a mixed substitution and makes the numbers less obvious.
Decoding
Paste numbers in pairs (23 15 31) or dot groups (.. … . …..), with slashes between words. Pairs are read as row and column; any pair outside 1–5 shows as a question mark. For keyed Polybius squares, enter the same keyword the sender used.
In history and in class
Tap code shows how people communicate under extreme constraints. The Polybius square is an ancestor of many later ciphers that use coordinates, such as ADFGVX in the First World War, and a neat way to teach grids and coordinates.
Not for secrets
Both systems are substitutions with a well-known grid. They are for communication, games and teaching, not for protecting information.
Private
Everything happens in your browser; sound is generated on your device.
A worked example
The word HELP in tap code: H is row 2, column 3 (.. …), E is row 1, column 5 (. …..), L is row 3, column 1 (… .) and P is row 3, column 5 (… …..). Written as numbers it is 23 15 31 35. Press Knock to hear it: two taps, a pause, three taps, a longer pause, and so on. Pasting 23 15 31 35 back in decodes to HELP.
Practising tap code
Start by memorising the first letter of each row — A, F, L, Q and V — so you can count from there to any letter. Encode short words here, press Knock and try to decode them by ear before looking. Two people can practise by tapping on a table and checking each other with the decoder.
Related tools
Signal with dots and dashes using the Morse Code Translator, use a 5×5 key square for pairs with the Playfair Cipher, turn letters into single numbers with the A1Z26 Cipher, or spell by voice with the Phonetic Alphabet Translator.
Checked against the current version of the Tap Code & Polybius Square on .

