A Brief History of Morse Code
Samuel Morse and Alfred Vail developed Morse code in the 1830s to transmit messages over electrical telegraph lines. The system encodes letters and numbers as sequences of short and long signals — dots and dashes — that can be sent as electrical pulses, sound, or light. The original code was designed to be fast to learn and fast to transmit, with the most common English letters assigned the shortest codes: E is a single dot, T is a single dash.
Morse code remained the primary long-distance communication technology for nearly a century. It was the medium for news dispatches, ship communications, and wartime intelligence. The first transatlantic telegraph message was sent in Morse in 1858. The distress signal SOS (··· --- ···) was standardised in 1906 and remained the international maritime distress code for most of the twentieth century.
Today, Morse code is still in active use among amateur (ham) radio operators, who are required to learn it for certain licence classes in many countries. It's also used in emergency signalling when voice communication isn't possible — a torch flashing SOS is universally recognisable. For people with certain disabilities, Morse code provides a reliable single-switch input method that can be used to drive assistive technology.
How the Encoding Works
Each letter maps to a unique sequence of dots (dit) and dashes (dah). The full International Morse Code (also called ITU Morse) alphabet covers A–Z, 0–9, and a set of punctuation marks. A few key mappings to know:
E→·T→−A→·−N→−·S→···O→−−−SOS→··· −−− ···
Spacing is as important as the dots and dashes. A gap between elements within a letter is 1 unit. A gap between letters is 3 units. A gap between words is 7 units. This timing structure is what makes audio Morse intelligible — getting the spacing wrong makes it harder to decode even if every element is correct.
Audio Playback via the Web Audio API
The translator plays Morse code using the browser's built-in Web Audio API — no external library, no server-side processing. The implementation uses an OscillatorNode to generate a sine wave at a specified frequency (typically 600–700 Hz, which sits in the centre of the human hearing range for tonal discrimination). Each dit or dah is scheduled as a precisely timed segment of audio output using the AudioContext's high-resolution clock.
The frequency and speed are adjustable. Lower frequencies (around 400 Hz) sound warmer and are easier on the ears for long listening sessions. Higher frequencies (700–800 Hz) are more piercing but can cut through background noise — closer to what an actual radio signal sounds like. Speed is set in words per minute (WPM), which determines the duration of each dit unit in milliseconds.
Learning Tips for the Morse Alphabet
Audio is the most effective way to learn Morse code. Reading dots and dashes from a chart trains your visual memory, but practical Morse is always heard, not read. The translator's audio playback lets you hear each character as it's encoded, which accelerates the auditory association.
A few techniques that speed up learning:
- Learn the most frequent English letters first: E, T, A, I, N, O, S, H, R — these cover the bulk of any English text
- Use the sound of each letter: E ("dit"), T ("dah"), A ("di-dah"), N ("dah-dit") — say the sounds aloud as you learn
- Start at a slow speed (5–8 WPM) to identify individual elements, then increase speed to develop fluency
- Practice with short, familiar words before moving to arbitrary text
SOS and Common Shorthand
SOS is the best-known Morse sequence: three dots, three dashes, three dots, sent as a continuous sequence without the usual inter-letter spacing. In practice it's sent as one unbroken group rather than three separate letters. Other common shorthand used in amateur radio includes CQ (calling any station), 73 (best regards, used as a sign-off), and QRZ (who is calling me?).
Even if you never use a radio, knowing SOS in Morse is a practical survival skill. A torch, a mirror in sunlight, or tapping on a surface can all carry the signal.
Translate any text to Morse code and play it as audio.
Adjustable tone frequency and speed — runs entirely in your browser.