Encoding8 min read

Morse Code: History, How It Works, and Modern Uses

Learn how Morse code works, its fascinating history from the telegraph to the Titanic, and where it's still used today. Includes encoding tables and practical examples.

Three dots, three dashes, three dots. Even if you've never studied Morse code, you probably know what that means: SOS. It's one of the most universally recognized signals in human history, and it was built on a communication system that a painter invented in the 1830s because he missed a message about his dying wife.

The Origin Story

Samuel Morse wasn't a scientist or engineer — he was a portrait painter. In 1825, while working on a commission in Washington D.C., he received a letter informing him that his wife was ill. By the time a second letter arrived saying she had died, she'd already been buried. The slow speed of communication had cost him the chance to say goodbye.

This personal tragedy drove Morse to develop a way to send messages instantly over long distances. Working with physicist Joseph Henry and machinist Alfred Vail, he built the first practical telegraph system. The code that bears his name — Morse code — was the protocol that made it work.

On May 24, 1844, Morse sent the first official telegraph message from Washington to Baltimore: "What hath God wrought." The age of near-instant long-distance communication had begun.

How Morse Code Works

Morse code represents each letter and number as a unique sequence of short signals (dots, or "dits") and long signals (dashes, or "dahs"). A dash is three times the length of a dot.

The most common letters get the shortest codes — a design decision that makes transmission faster:

E  .        T  -
A  .-       N  -.
I  ..       M  --
S  ...      O  ---

The full alphabet:

A  .-      N  -.      0  -----
B  -...    O  ---     1  .----
C  -.-.    P  .--.    2  ..---
D  -..     Q  --.-    3  ...--
E  .       R  .-.     4  ....-
F  ..-.    S  ...     5  .....
G  --.     T  -       6  -....
H  ....    U  ..-     7  --...
I  ..      V  ...-    8  ---..
J  .---    W  .--     9  ----.
K  -.-     X  -..-
L  .-..    Y  -.--
M  --      Z  --..

Translate any text to Morse code and back with the Morse Code Translator.

The Timing Rules

Morse code isn't just about dots and dashes — the spaces between them carry meaning too:

  • Within a character: 1 dot-length of silence between each dot/dash
  • Between characters: 3 dot-lengths of silence
  • Between words: 7 dot-lengths of silence

This timing is why Morse code works as audio, light flashes, or any on/off signal. The information is in the pattern of durations, not in the medium carrying it.

A skilled telegraph operator could send 20-30 words per minute. Expert operators developed a "fist" — a personal rhythm recognizable to other operators, like a voice you know over the phone.

Why Those Specific Patterns?

Morse and Vail designed the code to minimize transmission time. They studied letter frequency in English by counting type in a printer's type case and assigned shorter codes to more common letters:

  • E (most common) = single dot
  • T (second most common) = single dash
  • A, I, N = two symbols
  • Less common letters like Q, X, Z = four symbols

This is an early application of what information theory would later formalize: efficient encoding assigns shorter codes to more frequent symbols. The same principle underlies Huffman coding, which is used in ZIP files, JPEG images, and MP3 audio.

SOS and the Titanic

The distress signal SOS (... --- ...) was adopted internationally in 1906, chosen not because it stands for "Save Our Souls" or "Save Our Ship" (it doesn't stand for anything), but because its pattern is unmistakable and easy to send under stress.

The most famous SOS was sent by the RMS Titanic on April 15, 1912. Wireless operators Jack Phillips and Harold Bride transmitted distress calls continuously as the ship sank. The nearby SS Californian had turned off its wireless for the night and never heard the call. The SS Carpathia, 58 miles away, picked up the signal and rescued 710 survivors.

The disaster led to the Radio Act of 1912, which required ships to maintain 24-hour radio watches. Communication technology literally became a matter of law because of one catastrophic night.

Morse Code Beyond Telegraph

Maritime Communication

Even after voice radio became standard, Morse code remained mandatory for ships until 1999 when the Global Maritime Distress and Safety System (GMDSS) replaced it with satellite and digital technologies. The last commercial Morse code transmission from a U.S. ship was sent on July 12, 1999: "What hath God wrought" — echoing Morse's original message.

Aviation

Early aircraft used Morse code beacons for navigation. Non-directional beacons (NDBs) still transmit their identifier in Morse code today, and pilots are expected to verify the beacon identity by listening to the code. Even GPS-era aviation hasn't fully abandoned dots and dashes.

Amateur Radio

Ham radio operators are the keepers of the Morse code flame. While it's no longer required for amateur radio licenses in most countries (the U.S. dropped the requirement in 2007), many operators still use it by choice. CW (continuous wave) Morse transmissions can get through when voice can't — lower bandwidth means the signal punches through noise and interference.

Military

Special forces and intelligence agencies have historically used Morse code because it requires minimal equipment — you can send it with a flashlight, a mirror, or by tapping on a pipe. In prisoner-of-war camps, captives have communicated by tapping Morse code on walls.

ℹ️

During the Vietnam War, Navy POW Jeremiah Denton blinked "T-O-R-T-U-R-E" in Morse code during a televised propaganda interview. His captors didn't notice, but intelligence analysts did.

Morse Code as a Digital Encoding

From a computer science perspective, Morse code is a variable-length binary encoding — each character is a different-length sequence of two symbols. This makes it interesting to compare with other encoding schemes.

Unlike fixed-width encodings like ASCII (7 bits per character) or UTF-8 (1-4 bytes per character), Morse code uses separators (silence gaps) to delimit characters. Without those gaps, the message would be ambiguous — "..." could be "S" or "EEE" or "EI" or "IE."

This is similar to how binary encoding works — each character becomes a fixed-width sequence of ones and zeros, separated by spaces for readability. The difference is that binary uses 8 bits per character (fixed width), while Morse uses 1-4 symbols (variable width optimized for frequency).

Compare Morse to other encoding approaches:

Text:    "SOS"
Morse:   ... / --- / ...
Binary:  01010011 01001111 01010011
ROT13:   SBF

Each representation serves a different purpose. Morse was optimized for human transmission speed. Binary is optimized for computer storage. ROT13 just scrambles the text for casual obscuration.

Learning Morse Code

If you want to learn Morse code, the modern approach uses the Koch method: start with two characters at full speed, add a new character only when you can copy the existing ones at 90% accuracy. This trains pattern recognition rather than counting dots and dashes.

Common mnemonics help with memorization, but experienced operators don't think in dots and dashes — they hear whole characters and even words as distinct sound patterns. "SOS" doesn't sound like "dot dot dot dash dash dash dot dot dot." It sounds like "di-di-dit dah-dah-dah di-di-dit" — a single rhythmic phrase.

A few characters to start with:

E  .       (shortest)
T  -       (also short)
A  .-      ("a-DAHHH")
N  -.      ("DAHHH-dit")
S  ...     ("di-di-dit")
O  ---     ("dah-dah-dah")

Modern Pop Culture

Morse code shows up in surprising places. Android phones vibrate the Morse code for "SMS" (... -- ...) when a text message arrives (if you enable the right setting). Movies use it as a plot device — Christopher Nolan's Interstellar features Morse code transmitted through gravity waves. Geocachers and escape room designers use it for puzzles.

It's also a common programming exercise. Encoding text to Morse code is a classic intro-to-programming problem that teaches string manipulation, dictionary lookups, and character iteration.

Try It Yourself

There's something deeply satisfying about converting text to Morse code — watching words become patterns of dots and dashes, then converting them back:

All processing happens in your browser. Tap out some dots and dashes — Samuel Morse would have appreciated the simplicity.

Tools Mentioned

Related Articles