How Morse code works
Morse code represents each letter and digit as a sequence of short signals (dots, written .) and long signals (dashes, written -). It was designed so the most common letters have the shortest codes — E is a single dot, T a single dash.
This translator uses the International Morse Code standard. Encoding maps each character to its code separated by spaces; decoding splits on spaces for letters and / (or a wider gap) for word breaks.
Worked example
The distress signal SOS:
... (three dots).--- (three dashes).... --- ... — famously easy to recognize.Timing and spacing
Real Morse timing is relative to the dot length: a dash is three dots long, the gap between symbols is one dot, between letters three dots, and between words seven. In text we show one space between letters and a slash (or wider space) between words. The optional audio uses the Web Audio API to beep the dots and dashes at those proportions so you can hear the rhythm.