Who invented Morse code?
Samuel F. B. Morse (1791–1872) is the name on the code, and he deserves it: he conceived the single-wire electric telegraph, built the first working models, fought for the patents and persuaded Congress to fund the first line. But Morse was a painter, not an engineer, and the system that bears his name was a collaboration.
Alfred Vail (1807–1859), a young machinist from a family of ironworkers in Morristown, New Jersey, saw Morse's crude 1837 demonstration at New York University, joined him, and put up money in exchange for a share of the patent. Vail built the telegraph key and register, and most historians credit him with reworking the code into the dot-and-dash alphabet we recognize. Morse also drew on the electromagnet research of physicist Joseph Henry.
The story of why Morse turned from painting to telegraphy is often told: in 1825, while he was painting a portrait in Washington, a letter arrived by horse saying his wife was ill. By the time he reached home in Connecticut she had already been buried. Whether or not that was the whole motive, Morse spent the rest of his life trying to make distance disappear.
When was Morse code invented?
There is no single date, which is why you will see 1836, 1837, 1838 and 1844 quoted. Here is what happened when:
- 1832: Morse sketches the idea on the voyage home from Europe.
- 1837: first working demonstrations and the patent caveat. Vail joins.
- 1838: the dot-and-dash letter code replaces Morse's original numbered-codebook scheme; public demonstration on January 11 at Speedwell Ironworks.
- 1840: the US patent is granted.
- 1844: the first public message over a real line, Washington to Baltimore, on May 24.
If you want one answer for a quiz: Morse code was invented in 1837–1838 and first used publicly in 1844.
Why was Morse code invented?
Because the telegraph needed it. Earlier electrical telegraphs, such as Cooke and Wheatstone's in England, used several wires and needles that pointed at letters on a dial. They were expensive and slow. Morse's insight was to use one wire and a single electromagnet that simply pulled a lever when current flowed. A one-wire system can only say "on" or "off", so the letters had to be encoded as patterns of short and long pulses. That constraint is Morse code.
Morse's first scheme sent numbers only; each number stood for a word in a printed codebook. Vail's alphabet of dots and dashes did away with the book. The two men reportedly visited a local print shop and counted the type in the compositor's cases to find which letters were most common, giving E a single dot and T a single dash. That frequency-based design is why Morse code is still remarkably efficient.
The first Morse code message
What hath God wrought
On May 24, 1844, Samuel Morse sat in the chamber of the Supreme Court inside the US Capitol and tapped out a verse from the Book of Numbers, chosen by Annie Ellsworth, the daughter of the Commissioner of Patents. Alfred Vail received it at the Baltimore and Ohio Railroad depot in Baltimore and sent it straight back. In International Morse it reads:
.-- .... .- - / .... .- - .... / --. --- -.. / .-- .-. --- ..- --. .... -
(Morse himself would have used the original American code, which differs slightly; see American vs International Morse.)