My Morse Code Translator

Who Invented Morse Code? Samuel Morse, Alfred Vail and the Code That Changed

Who invented morse code has a short answer and an honest one. The short answer is Samuel F. B. Morse, the American painter-turned-inventor whose name is on the telegraph patents and on the code. The honest answer is that three stages and at least three people made the code you can type into the translator on this page: Morse's original idea, the dot-and-dash alphabet worked out with his partner Alfred Vail around 1840, and the German revision of 1848 that became International Morse in 1865. Only four letters of the original survive unchanged. Here is how it happened, with the dates the sources agree on and the one question they still argue about.

Our Morse code translator converting "WHAT HATH GOD WROUGHT" into Morse code, showing the dots and dashes .-- .... .- - / .... .- - .... / --. --- -.. / .-- .-. --- ..- --. .... -
“WHAT HATH GOD WROUGHT” converted in our translator — screenshot of the tool on this page.
.... . .-.. .-.. --- / .-- --- .-. .-.. -..

👀 Preview

Press ▶ Play — this shows what you'll see and hear.

Customize your message

Your picture appears in Play and downloaded videos. Note: it can't be included in a shared link — links carry the message only.

Share as a secret message

The message is hidden inside the link and decodes with sound & light when your friend opens it.

The short answer

Samuel Finley Breese Morse (born 27 April 1791, died 2 April 1872) is credited with inventing Morse code, together with the single-wire electric telegraph it was designed for. He received US Patent 1,647 for the telegraph's signalling method on 20 June 1840, and on 24 May 1844 he sent the first message over the Washington–Baltimore line: "What hath God wrought."

But the code went through big changes after Morse sketched it. His partner Alfred Vail did much of the work of turning the idea into a practical alphabet, and the version used worldwide today — International Morse code — is a later European revision. So "Morse" is the right name to give, as long as you know it's the name on a team effort that kept evolving for three decades.

A painter on a ship, 1832

Morse was not trained as a scientist. He made his name as a portrait painter and helped found the National Academy of Design in New York in 1826, serving as its president. The Linda Hall Library's profile calls him "first and foremost a painter, and not a bad one."

The telegraph story starts in 1832, on a ship carrying him home from Europe. A fellow passenger, Charles Thomas Jackson, was well read in the new science of electromagnetism, and conversations about it convinced Morse that a signal could be sent along a wire and detected at the far end. He came off the ship with the idea of a single-wire telegraph and a notebook of sketches — and spent the next twelve years turning it into something that worked.

Morse's first code was numbers, not letters

The code Morse first planned looks nothing like what you see on this page. His original scheme sent only numbers. Each word would have a number assigned to it in a code book; the sender would look up the word and transmit its number, and the receiver would look the number up again to recover the word. The telegraph itself would mark the numbers as indentations on a moving paper tape.

That design had an obvious weakness: it needed both operators to hold the same dictionary, and it couldn't send a word the dictionary didn't contain — a name, a place, a new term. The leap from numbers to an alphabet, where any word can be spelled, is what made the code general-purpose. And that leap is where Alfred Vail comes in.

Alfred Vail joins, 1837

Alfred Vail (1807–1859) was a skilled machinist whose family owned the Speedwell Ironworks in Morristown, New Jersey. On 2 September 1837 he saw one of Morse's early telegraph experiments at New York University, was taken with it, and struck a deal: he would develop the equipment at Speedwell at his own expense in return for a share of the proceeds.

Vail rebuilt Morse's crude apparatus into machinery that worked reliably. He is credited with the first proper sending key and with improved recording registers and relay magnets. In January 1838, at Speedwell, the two men gave the first public demonstration of their telegraph across two miles of wire. The message was "A patient waiter is no loser" — fitting, given how long they would still have to wait for funding.

The alphabet: who actually worked out the dots and dashes?

This is the question historians still argue about. The code that went into use around 1840 assigned short and long marks — dots and dashes — directly to letters, and it gave the commonest letters the shortest patterns. One well-known account says Vail estimated how often each letter is used by counting the pieces of type in the cases of a local newspaper's print shop in Morristown, then handed the frequent letters (like E, which became a single dot) the quickest codes.

The case for Vail is that the practical alphabet appears after he joined and matches his hands-on, engineering approach. The case for Morse is that Vail himself never claimed it: in an 1838 letter to his father he wrote that "Professor Morse has invented a new plan of an alphabet, and has thrown aside the Dictionaries," and his 1845 book about the telegraph credited the code to Morse. The Linda Hall Library sums it up neutrally — many think Vail worked it out, others give the credit to Morse. What isn't disputed is that the patents carried Morse's name, which is a large part of why the code carries it too.

Washington to Baltimore, 1844

Morse spent years trying to win government backing. In December 1842 he strung wires between two committee rooms in the US Capitol and sent messages back and forth to show members of Congress how it worked. In 1843 Congress appropriated $30,000 to build an experimental line between Washington, D.C., and Baltimore.

On 24 May 1844 the line opened officially. From the Supreme Court chamber in the Capitol, Morse sent "What hath God wrought," and Vail, waiting in Baltimore, received it and sent it back. The words came from the Bible (Numbers 23:23) and were chosen by Annie Ellsworth, the young daughter of the US Patent Commissioner, Henry Leavitt Ellsworth, who had championed Morse's invention. The paper tape that recorded that message is held by the Smithsonian's National Museum of American History.

Operators started listening instead of reading

Morse designed the telegraph to write — a stylus pressed marks into a moving paper tape. But operators soon noticed that the receiver clicked differently for a dot and a dash, and that with practice they could understand the clicks by ear and write the message down directly. The tape became unnecessary.

This changed what Morse code is. It stopped being a visual system of marks and became a rhythm: something heard, felt and eventually sent by radio as short and long tones. Operators began saying dit and dah for the two sounds, and modern learners are still taught to recognise each letter as a single sound-shape rather than counting dots. If you want to hear that difference for yourself, the hearing Morse code page explains how operators learned to copy by ear.

The 1848 rewrite that made it international

The code Morse and Vail used in America — now called American Morse or railroad Morse — had awkward features: dashes of different lengths, and spaces inside some letters. That made it hard to send cleanly, especially once lines crossed borders and languages.

In 1848 a German telegraph engineer, Friedrich Gerke, published a much-improved version, later known as the "Hamburg alphabet". He got rid of the internal spaces and the different-length dashes, leaving just two elements — the dot and the dash — and changed many of the letter patterns. Germany and Austria adopted it in 1851. This is the key reason today's Morse is easier to learn than the original: every letter is built from only two signals and the same fixed gaps.

1865: International Morse code

In 1865 the European telegraph administrations agreed on a common code, International Morse, built mostly on Gerke's version. A few letters came from other sources (the codes for O and P from a system by Steinheil), J got a new code, and X, Y and Z changed. The digits 0–9 were redesigned completely.

The result: of the letters in today's code, only E, H, K and N are the same as in the original American code — and K and N had their short dashes lengthened to full length. So when you use the translator on this site, you are using a code Morse would partly recognise but did not finish. The modern standard is maintained by the International Telecommunication Union as Recommendation ITU-R M.1677. Our American Morse code translator lets you compare the two side by side.

What happened to Morse and Vail

The two men's paths split. Vail left the telegraph business in 1848, believing the managers of Morse's lines did not value what he had contributed, and moved back to Morristown. He died in 1859, aged 51. Morse spent years fighting to be recognised as the telegraph's sole inventor, grew wealthy from it, and died in New York City on 2 April 1872.

Vail's family name did reach the top of American communications in the end: his cousin Theodore N. Vail became the first president of AT&T, the telephone company that would eventually replace much of the telegraph's role.

How long Morse code was used

Versions of Morse code have been in use for more than 160 years — longer than any other electrical message encoding system. It ran the telegraph networks, crossed oceans by cable, and moved to radio, where it became the international language of maritime distress — the SOS signal is its most famous survivor. Maritime use as a distress standard ended in 1999, when the Global Maritime Distress and Safety System replaced it. In the United States, the last commercial Morse code transmission was made on 12 July 1999, signing off with the same words Morse had sent in 1844: "What hath God wrought."

It is not gone, though. Amateur radio operators still use it widely (often called CW), navigation beacons for aircraft have long identified themselves with short Morse call signs, and people keep learning it for emergencies, puzzles, jewellery and fun.

Try the code yourself

The easiest way to see what Morse and Vail built is to send their messages. Type "What hath God wrought" into the translator on this page and play it: that is the line that opened the first long-distance telegraph. Then try "A patient waiter is no loser," the first public demonstration message from 1838. Notice how E, the commonest letter, is a single dot — the frequency idea from those Morristown type cases still shapes the code today.

To keep going, read what Morse code is for a plain-English overview, learn the full Morse code alphabet, or follow the learn Morse code hub for a step-by-step path.

Researching this on 14 October 2026, I found the sources disagree on two details — the date of the Speedwell demonstration (6 or 11 January 1838) and the length of the 1844 line — so this page gives only what they agree on. Then I typed "What hath God wrought" into our translator and played it at 15 WPM; hearing the first long-distance telegram rendered in today's International code, which Morse himself never used, is a small reminder of how much the code changed after him.

Frequently Asked Questions

Q. Who invented Morse code?

Samuel F. B. Morse is credited with inventing Morse code and the electric telegraph it was built for. His partner Alfred Vail helped develop the dot-and-dash alphabet around 1840, and the modern International Morse code is a revision made in 1848 and adopted in 1865.

Q. When was Morse code invented?

Morse conceived the telegraph in 1832, demonstrated it publicly in January 1838, patented it in 1840 and sent the first message on the Washington–Baltimore line on 24 May 1844. The international version used today was agreed in 1865.

Q. Did Alfred Vail invent Morse code?

It is disputed. Many historians think Vail worked out the practical dot-and-dash alphabet; others credit Morse, and Vail himself attributed the code to Morse in his letters and his 1845 book. The patents carried Morse's name.

Q. What was the first message sent in Morse code?

The first public demonstration message, in January 1838, was "A patient waiter is no loser." The famous first message on the Washington–Baltimore line, on 24 May 1844, was "What hath God wrought."

Q. Is the Morse code we use today the same as Samuel Morse's?

No. Today's International Morse code is based on Friedrich Gerke's 1848 revision, adopted internationally in 1865. Only four letters — E, H, K and N — match the original American Morse code.

Q. What was Samuel Morse's job before the telegraph?

He was a portrait painter. He helped found the National Academy of Design in New York in 1826 and served as its president before turning to the telegraph.

Related guides

← Back to the My Morse Code Translator home page.

Sukie

By Sukie

Sukie is the creator of My Morse Code Translator — a puzzle nerd and gadget tinkerer who fell down the Morse code rabbit hole and decided to build the most fun Morse translator on the web. When she's not adding new sound packs or reveal animations, she's decoding hidden messages in songs or designing Morse code bracelets for friends.

Last updated: 2026-10-23