How Morse Code Is Structured
Morse code encodes information as sequences of two signal types: a short signal (called a dit or dot) and a long signal (called a dah or dash). Every letter, digit, and common punctuation mark has a unique dit-dah sequence. The code was designed so that the most frequently used letters in English have the shortest sequences — E is a single dit, T is a single dah — which maximises transmission speed for typical English text.
Beyond the individual signal elements, the structure of Morse code depends critically on timing. A Morse message isn't just a sequence of dots and dashes — it's a precisely timed sequence of sounds and silences. The ratios between these durations are defined by international standard and must be respected for the code to be correctly decoded by a human listener.
Standard Timing Rules
All Morse timing is expressed as multiples of a base unit — the duration of a single dit. Everything else is a ratio of this unit:
- Dit (dot) — 1 unit
- Dah (dash) — 3 units
- Gap between elements within a letter — 1 unit (silence)
- Gap between letters within a word — 3 units (silence)
- Gap between words — 7 units (silence)
These ratios are fixed regardless of speed. Speeding up Morse code means shortening the base unit; all other durations scale proportionally. A 20 WPM transmission has exactly the same element-to-gap ratios as a 5 WPM transmission — the 20 WPM version is simply faster.
The words-per-minute measure is calibrated against the word "PARIS" (chosen because it represents the average letter complexity of typical English text). One WPM means you could send "PARIS" once per minute. At 20 WPM, "PARIS" would be sent 20 times per minute — approximately once every three seconds.
Farnsworth Timing
Standard timing scales everything uniformly with speed. Farnsworth timing is a variant used for training, where the individual characters are sent at a higher speed but the gaps between letters and words are stretched out. This exposes the learner to the actual rhythmic "feel" of fast characters while giving them more time to decode each one before the next arrives.
For example, you might send characters at 20 WPM but use 5 WPM inter-character spacing. As the learner improves, the inter-character gap is reduced until both match. Farnsworth timing is considered more effective than starting at a uniformly slow speed because it develops the correct auditory recognition of fast character patterns from the beginning, rather than training the learner to decode slow characters that sound different from fast ones.
The Web Audio API Approach
The generator produces audio using the browser's native Web Audio API — no external audio files, no server requests. An OscillatorNode generates a pure sine wave at the configured frequency. Each dit and dah is a precisely scheduled segment of oscillator output; each gap is a period of silence, implemented by stopping the oscillator or reducing gain to zero.
Scheduling is done using the AudioContext.currentTime high-resolution clock, which operates in seconds with sub-millisecond precision. This is significantly more precise than setTimeout, which can drift substantially at high rates — critical for Morse, where the timing ratios must be accurate for the result to be decodable.
The WAV download works by rendering the entire audio sequence offline using an OfflineAudioContext, then encoding the resulting buffer as a WAV file in JavaScript and triggering a download. The offline render is faster than real-time, so even long messages generate quickly.
WPM Speed Presets
The generator supports a range of speeds suited to different use cases:
- 5 WPM — Beginner learning speed. Individual elements are clearly distinguishable, suitable for recognising new characters.
- 10–12 WPM — Slow conversational speed. Comfortable for learners who know the alphabet but aren't yet fluent.
- 20 WPM — Standard conversational Morse. The speed at which most amateur radio contacts happen. The international requirement for certain licence classes.
- 25–30 WPM — Proficient operator speed. Characters start to blur into patterns rather than individual elements.
- 35+ WPM — Expert and contest speed. Very few operators communicate at this speed; it requires years of practice.
Practical Uses Today
Morse code has a smaller but persistent presence in the modern world:
- Amateur radio licensing — Many countries still include Morse code proficiency in their amateur radio examinations, or offer higher licence classes that require it. The generator is useful for practice material.
- Accessibility — Morse code can be used as a single-switch input method for people with limited motor control. A single button can send dit or dah signals, enabling text input for people who cannot use a standard keyboard.
- Emergency signalling — SOS in Morse remains universally recognisable and can be signalled with a torch, a whistle, or any device capable of producing distinguishable short and long signals.
- Creative and artistic projects — Morse has been used in music, art installations, and design as a way to encode messages in a form that's visible but not immediately readable to most viewers.
Generate Morse code audio from any text.
Adjustable tone and WPM speed — play in browser or download as WAV.