← All tools

Tap Code / Polybius Square

Encode and decode text with the tap code (the "knock code" used by prisoners of war) and the classical Polybius square. Each letter is located in a 5×5 grid and represented by its row and column — historically transmitted as two groups of taps (one to five knocks for the row, a pause, then one to five for the column), or written as the two-digit coordinate rowcol (so A=11, E=15, T=44). Because 26 letters don't fit 25 cells, one pair shares a cell: choose C/K merged (the military tap-code convention, where K is written as C) or I/J merged (the classical Polybius convention, where J is written as I). Convert text to taps or numbers and back, with the grid shown for reference. Everything runs locally in your browser.

Letter merging

Encode (text → code)

Output format

Decode (code → text)

Reference grid

The math. The 5×5 Polybius square places the 25 letters of a reduced alphabet in row-major order; the 26th letter shares a cell with a neighbour — either K→C (tap code) or J→I (Polybius). Each letter at row r, column c (both 1–5) is encoded as the two-digit number 10r + c, or as r taps followed by c taps with a short pause between. A space between words is written as 00 (numeric) or / (taps). Only letters A–Z and spaces are encoded; other characters are ignored. To decode, split the numeric stream into two-digit tokens (each digit must be 1–5, or 00 for a space) and look up the cell, or split the tap stream on / (words) then whitespace (letters) then count the dots in each half. Pairs with the Caesar, Vigenère, and Classical Ciphers, and with Morse Code and the NATO Phonetic alphabet. Everything runs locally — nothing leaves your browser.