The NATO phonetic alphabet replaces each letter with an unmistakable code word — Alpha, Bravo, Charlie — so spelling is reliable over radio or phone. This encoder converts a whole sentence, spelling every word letter by letter.
How it works
Each character is looked up in two tables and joined within a word by dashes:
A Alpha B Bravo C Charlie D Delta E Echo
F Foxtrot G Golf H Hotel I India J Juliett
… Z Zulu
digits: 0 zero 1 one 2 two 3 tree 4 fower 5 fife
6 six 7 seven 8 eight 9 niner
Letters are uppercased before lookup. Within a run of letters or digits the code words are joined with dashes; a space in the input becomes a space in the output, so word boundaries are preserved. Characters that are neither letters nor digits pass through unchanged.
Example and tips
GERA encodes to Golf-Echo-Romeo-Alpha, and “Gera 24” becomes
Golf-Echo-Romeo-Alpha two-fower. Read each code word fully and pause between
words — the value of the alphabet is that Bravo can never be mistaken for Delta
the way the letters B and D can. Use it to read out reference numbers, names, and
postcodes accurately the first time.