morsify
Mechanism & History

How Does Morse Code Work

Morse code works by encoding letters and numbers as sequences of short signals (dots) and long signals (dashes). A dot lasts one unit; a dash lasts three. The gaps between them carry meaning too: one unit between elements, three units between letters, seven units between words. That timing ratio — 1:3:7 — is the entire system.

The two signals: dot and dash

Every piece of information transmitted in morse code reduces to one of two signal types: a short signal called a dit (dot) and a long signal called a dah (dash). The dit is the base unit — everything else is defined as a multiple of it. A dah lasts exactly three dit-lengths. That is the entire vocabulary of the code.

What makes the system work is not just the signals themselves, but the silences between them. Gaps are also measured in dit-lengths. The pause between two elements within the same character — say the gap between the dot and dash of the letter A (.-) — lasts one unit of silence. The pause between two complete letters lasts three units. The pause between two words lasts seven units. Written out:

The 1:3:7 ratio is what makes morse both machine-decodable and human-learnable. Every duration is a multiple of the same base unit, so an operator only needs to maintain a consistent rhythm. No clock or timestamp is required — just a steady internal sense of pace. A beginner tapping at 5 words per minute and an expert at 40 words per minute both use the same ratios; the base unit simply changes length.

There is an interesting historical footnote here. The original American Morse code of the 1830s — the version actually used on the first telegraph lines — was slightly messier. Some characters included internal pauses of different lengths, making the timing rules harder to memorise and harder to automate. When the International Telegraph Union (ITU) standardised a revised version in 1865, it cleaned up all those irregularities and established the clean 1:3:7 system. This international standard, sometimes called Continental Morse, became the version used worldwide and the one taught today.

How letters are assigned their patterns

The pattern for each letter was not chosen arbitrarily. Samuel Morse and his collaborator Alfred Vail wanted the most commonly used letters to be the fastest to transmit. To find the most common letters, they analysed the frequency of each letter in ordinary English text — reportedly by counting the number of each letter type in a printer's type case, where the compositor had already calibrated stock to match demand.

The result: the most frequent letter in English, E, received the shortest possible code — a single dot (.). The second most frequent, T, received a single dash (-). The next tier of common letters got two-element codes:

Common letters like S (...) and O (---) received three-element codes. Rare letters like Q (--.-), X (-..-), Y (-.--), and Z (--..) were given four-element codes — they take longer to send because they appear less often, so the total transmission time for average text is minimised.

This is Huffman coding before Huffman. The mathematician David Huffman published his optimal prefix-free coding algorithm in 1952 — a century after Vail applied the same intuition by hand. Claude Shannon formalised information theory around the same time, giving the mathematical proof for why shorter codes for common symbols minimise average message length. Morse and Vail arrived at the same conclusion through empirical observation rather than theory.

One important implication: the letter-to-pattern assignment was optimised for English. The frequencies of E, T, A, I, N are specific to English-language text. German, for instance, uses E and N very frequently but also uses letters like Ä, Ö, and Ü that English does not have at all. Other languages had to graft their extra characters onto the system later, assigning them longer four-element or five-element patterns. The international standard eventually defined dedicated patterns for the German umlauts, Spanish Ñ, and various other diacritics — but all of them live in the longer, less efficient part of the code tree, because the efficient short slots were already taken by the English-frequency letters.

How the signal is physically transmitted

The physical medium of transmission does not matter to morse code — the 1:3:7 timing system works over any channel that can be switched between two states: on and off, present and absent, high and low. In practice, morse has been transmitted over at least four distinct physical media throughout its history.

Electrical wire (the original). The telegraph operator presses a key, which closes an electrical circuit and sends current down the wire. The receiver at the far end has an electromagnet that clicks audibly when current flows and falls silent when it stops. The operator listens to the rhythm of clicks — short and long — and decodes the letters mentally. The skill of an experienced telegrapher was entirely in the ear: top operators could receive at 35–40 words per minute without writing anything down, holding text in short-term memory and transcribing in chunks.

Radio (CW — continuous wave). A radio transmitter keyed on and off produces a carrier wave that appears and disappears at the receiver. The receiver is tuned to the transmitter's frequency and produces an audible tone — typically 600–800 Hz — in the operator's headphone whenever the carrier is present. The result sounds identical to a telegraph sounder in rhythm, but works across any distance a radio signal can travel. Shortwave CW signals routinely cover thousands of kilometres.

Light. A signal lamp or flashlight switched on and off transmits morse visually. The same 1:3:7 timing applies; the receiver reads the flashes rather than listening to tones. Naval signal lamps — very high-intensity directional lights — have been used for ship-to-ship morse communication since the late 19th century, because a directional light beam cannot be intercepted by an enemy without being in the line of sight. The Royal Navy and the United States Navy have used Aldis lamps for this purpose through the 20th century and maintain the capability today.

Sound directly. In training and practice, morse is transmitted as audible tones from a speaker or buzzer. A practice oscillator produces a 700 Hz tone controlled by the key. This is how beginners learn the code — the ear trains on the tonal pattern before the operator ever connects to a real circuit.

Why it's called continuous wave (CW)

When radio was first invented in the 1890s, the dominant transmitter technology was the spark-gap transmitter. A spark-gap produces a brief burst of electromagnetic energy that spreads across a wide swath of the radio spectrum — a “dirty” signal, occupying perhaps 10 kHz or more of bandwidth with each spark. This was acceptable when only a handful of stations existed, but as radio use grew the spectrum became crowded and interference between stations made communication unreliable.

The continuous-wave transmitter, developed in the early 1900s, solved this. Instead of a spark, it produces a pure, stable single-frequency signal — a sine wave at a fixed frequency. To transmit morse, the operator simply switches this continuous wave on and off with a key. The receiver hears the carrier appear (on) and disappear (off) as a tone in their headphones. The word “continuous” refers to the wave itself being uninterrupted in frequency when it is on, not to it being always on — it is the waveshape that is continuous (sinusoidal), as opposed to the damped oscillations of the spark transmitter.

CW is the narrowest-bandwidth communication mode in amateur radio. A well-shaped CW signal occupies roughly 100–150 Hz of spectrum. By comparison, a voice single-sideband (SSB) signal occupies about 2,700 Hz, and a standard FM voice signal occupies 15 kHz or more. This extreme narrowness has two practical consequences. First, more CW stations can fit in a given band segment than any other mode. Second, and more importantly for weak signal work, a CW signal can be pulled out of noise that would completely bury a voice signal. Experienced CW operators can copy signals that are 10–15 dB below the noise floor — signals so weak they produce no visible trace on a spectrum analyser. Automated CW decoders can work even deeper into the noise than human operators.

This noise immunity is why morse code remained the professional and military standard long after voice radio became practical, and why it remains the preferred mode for amateur radio distance records and weak-signal operation today.

The morse code tree: a decision tree for decoding

There is an elegant visual way to understand the entire international morse alphabet: a binary decision tree. Place a root node at the top. When you receive a dot, move left; when you receive a dash, move right. At each node in the tree is a letter (or number or punctuation mark). When the inter-character gap arrives — three units of silence — read the letter at the node where you currently are. Then return to the root for the next character.

The tree looks like this at its upper levels:

The letters E and T live at depth 1 (one element each). I, A, N, M live at depth 2. S, U, R, W, D, K, G, O live at depth 3. Rarer letters live at depth 4 or 5. Common letters are close to the root; rare letters are far from it. The tree structure is exactly the frequency-ordered assignment described above, made visual.

The tree reveals another important property of morse code: it is a prefix-free code. No valid character's pattern is a prefix of another character's pattern. The letter E is a single dot (.), and the letter I is two dots (..). But E is never confused with the first element of I, because the inter-character gap after E's single dot signals the character boundary. The silence is as informative as the signal.

This prefix-free property is also what makes the code unambiguous at any speed, without needing start and stop bits or any framing overhead. The timing itself carries all structural information — a remarkable economy that made morse extremely well-suited to the manual, skill-based operation of early telegraphy.

Where and why morse code was invented

Samuel Finley Breese Morse was an American painter and inventor. He is better remembered today for the code that bears his name than for his considerable reputation as a portrait artist, though in the 1820s and 1830s he was one of the most prominent painters in America. The telegraph grew out of a conversation Morse had on a ship crossing the Atlantic in 1832, where he heard about experiments with electromagnetism and asked whether an electrical pulse could be sent across a long wire. By the time the ship docked, Morse had sketched the basic concept of an electrical telegraph in his notebook.

The crucial figure in translating Morse's concept into a working system was Alfred Vail, a machinist and inventor who partnered with Morse in 1837. Vail built the equipment and is widely credited with redesigning the original coded system — which used numbered codes that required a codebook to look up — into the direct letter-encoding dot-dash scheme. Vail analysed the printer's type-case to count letter frequencies and assigned the patterns accordingly. The 1844 demonstration line from Washington D.C. to Baltimore was built with Vail's equipment and sent on Vail's hardware. The famous first message — “What hath God wrought” — was selected from the Bible by Annie Ellsworth, daughter of the U.S. Patent Commissioner, and tapped by Morse in Washington to be received by Vail in Baltimore.

The code spread rapidly through the telegraph industry. Railroads adopted it almost immediately for operational signalling: a telegrapher in each station controlled train movements, communicating with the next station to confirm track clearance and prevent collisions. News agencies used it to transmit breaking news faster than any physical courier. Financial firms moved market information between cities in seconds rather than days. By the 1860s, telegraph lines crossed the United States and, via the transatlantic cable laid in 1866, connected North America to Europe.

International standardisation became necessary as different countries developed their own telegraph systems with slightly different codes. In 1865, the International Telegraph Union (ITU — now the International Telecommunication Union) met in Paris and standardised a revised version of the code for multilingual use. This “International Morse Code” or “Continental Morse” is the version in use today, and it differs from the original American Morse in several character patterns.

Is morse code still used today?

The short answer is yes — in several specific contexts where its properties make it the right tool.

Aviation navigation. Every VOR (VHF Omnidirectional Range) navigation beacon transmits its 2–3 letter identifier in morse code at 1020 Hz, audible on the aircraft's navigation radio. Pilots use this to verify they are tuned to the correct beacon before relying on it for navigation. ICAO standards still require VOR morse identification transmission as of 2024, and pilots around the world — particularly those flying instrument approaches — learn to recognise the morse identifiers of the beacons they use regularly. It is not a dying system: every new VOR installed today transmits morse.

Amateur radio (CW). Morse is called CW in amateur radio, and it is the oldest operating mode still actively used. Major CW contests — the CQ World Wide CW Contest, the ARRL Sweepstakes CW, the IARU HF World Championship — attract tens of thousands of participants each year. Casual CW contacts (called QSOs) happen continuously on the HF bands, every day, around the world. Many operators pursue CW specifically because of its weak-signal capability: a 5-watt CW station with a simple wire antenna can make contacts on the other side of the planet that would be impossible with the same power in voice mode.

Maritime distress. The Global Maritime Distress and Safety System (GMDSS) replaced mandatory CW for commercial vessels in 1999, and most coast guard services no longer maintain 24-hour watch on the old CW distress frequency of 500 kHz. However, the ITU distress procedures for CW — including the famous SOS pattern (...---...) — remain defined in international regulations. Some naval and coast guard services retain CW capability, and the SOS pattern is still recognised internationally as a distress signal in any medium: radio, light, or sound.

Assistive technology. For people with severe physical disabilities — particularly those with locked-in syndrome caused by ALS, brainstem stroke, or other conditions that leave the person cognitively intact but unable to move — morse code can be the difference between communication and complete isolation. Eye-blink morse systems encode blinks as dots and dashes: a short blink is a dot, a long blink is a dash. Commercial and open-source blink-to-speech systems exist, and some patients communicate at reasonable speed using this method. A single muscle twitch, a cheek movement, or a breath puff can serve as the keying input. Morse's fundamental property — encoding all information into a single binary channel — makes it ideal for any interface with extremely limited bandwidth.

Military and intelligence. Several armed forces retain CW capabilities for low-probability-of-intercept (LPI) communication. A CW signal's narrow bandwidth makes it difficult to detect automatically; its simplicity means it can be keyed with minimal equipment in a field environment. Some military units also continue training in manual CW as a backup for situations where more sophisticated communications equipment is unavailable or compromised.

Where to go from here

Frequently asked questions

How does morse code work?

Morse code encodes letters and numbers as sequences of short signals (dots, or dits) and long signals (dashes, or dahs). The timing ratio is 1:3:7 — a dot is 1 unit, a dash is 3 units, the gap between elements within a character is 1 unit, the gap between characters is 3 units, and the gap between words is 7 units. An operator sends these signals by keying a telegraph, radio transmitter, or signal lamp on and off; the receiver decodes the rhythm by ear or eye. The entire system encodes all 26 letters using patterns of only two signal lengths — on and off.

Why were some letters given shorter morse patterns?

Morse and Vail counted letter frequency in newspaper print and assigned shorter patterns to the most common letters. E (the most frequent English letter) got one dot; T (the second most frequent) got one dash. Less common letters like Q, X, Y, and Z were given four-element patterns. This minimises average transmission time across a typical message — the same principle formalised by David Huffman's optimal prefix-free coding algorithm in 1952, roughly a century after Vail applied it by hand.

How is morse code transmitted over radio?

Over radio, morse is sent as CW (continuous wave) — the transmitter is switched on and off with a key, producing a carrier wave that appears and disappears. The receiver is tuned to that frequency and produces an audible tone — typically 700–800 Hz — whenever the carrier is present. The operator listens to the rhythm of the tone and decodes it by ear. CW is the narrowest-bandwidth mode in amateur radio (100–150 Hz), which is why it can penetrate noise that would swamp a voice signal. Experienced operators can copy CW signals that are entirely inaudible to other modes.

What is the timing ratio in morse code?

1:3:7. A dot lasts 1 time unit of signal on. A dash lasts 3 units on. The gap between elements within a character is 1 unit of silence. The gap between two characters (letters) is 3 units of silence. The gap between two words is 7 units of silence. Every duration is a whole-number multiple of the base unit, so an operator only needs to maintain a consistent internal rhythm — no clock is required. A beginner at 5 words per minute and an expert at 40 words per minute both use these same ratios.

Did Samuel Morse invent morse code alone?

No — Alfred Vail was essential. Vail redesigned Morse's original system (which used numerical codes for words, requiring a codebook to decode) into the direct letter-encoding dot-dash system. He counted letter frequencies in a printer's type case to assign shorter patterns to common letters, built the equipment for the 1844 Washington-to-Baltimore demonstration, and contributed major mechanical innovations to the telegraph itself. Morse held the patent and received most of the public credit; Vail's role was not fully recognised until decades later. The code is accurately a Morse-Vail collaboration.