Morse Code, Explained

After reading this you will be able to encode text into Morse by hand, decode a stream of dots and dashes back to letters, and reason about the timing that turns Morse into audible beeps at a chosen speed.

What Morse code is

Morse code is a way to represent letters, digits and a few punctuation marks as sequences of two symbols: a short signal (dot, written .) and a long signal (dash, written -). The letter E is a single dot. The letter T is a single dash. The letter S is three dots (...) and O is three dashes (---), so the distress call SOS is ... --- ....

Only the pattern of short and long, plus the gaps between them, carries information. That means Morse works over any channel that can be turned on and off: a telegraph key, a lamp, a radio carrier, a tap on a pipe, or a tone from your speaker. It was designed in the 1830s and 1840s for electrical telegraphy, and the International Morse Code standardized in 1865 is what nearly everyone uses today.

Morse is an encoding, not a cipher. Anyone who knows the alphabet can read it. It hides nothing. If you want secrecy you need a cipher such as the Caesar cipher, and even that is weak. Morse only gives you a way to move text through a one-bit channel.

When to use it, and when not

Reach for Morse when the channel is narrow. A single on/off line, a flashing light, or a keyed radio tone all suit it. Amateur radio operators still use Morse (call it CW, for continuous wave) because a human ear can pull a weak Morse tone out of noise far below the level where voice becomes unintelligible.

In puzzles and capture-the-flag challenges, Morse shows up constantly disguised as sound files, blinking pixels, or strings of dots and dashes written with unusual characters. Recognizing it is often the whole puzzle.

Never use Morse to protect a secret. It provides zero confidentiality. A string like ... . -.-. .-. . - reads as SECRET to anyone with the table. If you need to conceal the meaning, encode with Morse only after encrypting with a real cipher.

The timing rules

Everything in Morse is built from one time unit. Call it u. All five durations are integer multiples of u:

\text{dot}=1u,\quad \text{dash}=3u,\quad \text{intra}=1u,\quad \text{letter}=3u,\quad \text{word}=7u

Here dot and dash are the lengths of the on-signals. intra is the silent gap between two symbols inside one letter. letter is the silent gap between two letters. word is the silent gap between two words. Notice the symmetry: a dash is as long as three dots, and the between-letter gap is as long as three intra-symbol gaps.

Speed is quoted in words per minute (WPM). The standard reference word is PARIS, chosen because it takes exactly 50 units when you include the trailing word gap. So at a rate of W words per minute you send 50W units per minute, and one unit lasts

u = \frac{60}{50W} = \frac{1.2}{W}\ \text{seconds}

At W=20 WPM, u = 1.2/20 = 0.06 seconds, so a dot is 60 ms and a dash is 180 ms. That is why the audio speed control changes the pitch of nothing but stretches or compresses every beep and gap together.

Counting the units in PARIS

Why PARIS is exactly 50 units

The word PARIS encodes as .--. .- .-. .. .... Count the on-time and the gaps.

  1. P is .--.: dot(1) + dash(3) + dash(3) + dot(1) = 8 units of signal, plus 3 intra-gaps of 1 = 3. Total 11.
  2. A is .-: 1 + 3 = 4 signal, plus 1 intra-gap = 1. Total 5.
  3. R is .-.: 1 + 3 + 1 = 5 signal, plus 2 intra-gaps = 2. Total 7.
  4. I is ..: 1 + 1 = 2 signal, plus 1 intra-gap = 1. Total 3.
  5. S is ...: 1 + 1 + 1 = 3 signal, plus 2 intra-gaps = 2. Total 5.
  6. Between the five letters there are four letter-gaps of 3 units each: 4 \times 3 = 12.
  7. After the word comes one word-gap of 7 units.

Add the letters: 11 + 5 + 7 + 3 + 5 = 31. Add the letter-gaps: 31 + 12 = 43. Add the word-gap: 43 + 7 = 50. Exactly 50 units, which is what makes the WPM formula clean.

Some transmissions quote speed with the Farnsworth method, where the symbols are sent fast but the letter and word gaps are stretched. This helps beginners hear each character clearly while keeping realistic symbol timing. The character speed and the overall WPM then differ.

Encoding and decoding by hand

Encoding "HI 5"

Take the message HI 5 and build the Morse stream.

  1. Look up each character. H = ...., I = .., 5 = ......
  2. Join symbols within a letter with a single space (the letter separator in the tool's text output). Join whole letters that belong to the same word with a single space as well, and separate words with a slash or a wider gap.
  3. The result is .... .. / ....., where / marks the word boundary between HI and 5.

Decoding runs the table backward. Split on the word markers first, then on the letter gaps, then read each group of dots and dashes as one character. .... .. / ..... splits into [....][..] and [.....], which is HI then 5.

Digits follow a neat pattern worth memorizing. 1 is .----, 2 is ..---, and so on: the count of leading dots equals the digit, and the rest are dashes, until 5 is all dots (.....) and 6 starts adding dashes back from the front (-....). 0 is five dashes (-----).

Symbol lengths and frequency

Samuel Morse and Alfred Vail assigned the shortest codes to the most common English letters, so common text sends faster. The chart below shows the code length in symbols for each letter, and you can see that E and T take one symbol while Q, Y, J take four.

Letters ordered by code length. The four one and two-symbol codes cover E, T, I, A, N, M, which are among the most frequent letters in English.

The design is not a perfect match to modern frequency counts, but the intent is clear. Sending E costs one unit of signal, while sending Q (--.-) costs 3+3+1+3 = 10 units of signal plus gaps. The common letter is ten times cheaper.

Common mistakes when reading Morse

Most decoding errors come from gaps, not from confusing a dot with a dash. Three traps recur.

Losing the letter gap
If you treat the 3-unit letter gap as a 1-unit symbol gap, you merge two letters. .- .- (which is AA) collapses into .--., which is P. Getting the gap length right is the whole game.
Losing the word gap
Miss the 7-unit word gap and separate words run together into one long, unreadable string of letters.
Non-uniform hand keying
Human senders drift. A rushed dash can be nearly as short as a slow dot. Machines and the tool keep exact 1:3 ratios, so decoding tool output is reliable; decoding a person requires you to track the sender's own rhythm.

When you decode by ear, first find the sender's dot length by listening for the shortest repeated beep. Everything else is measured against it: anything about three times longer is a dash, and silences about three times the dot are letter boundaries.

Hear how speed changes the timing

The single most instructive variable is WPM, because it rescales every duration at once. Move the speed and watch the dot length change while the shape of the pattern stays fixed.

At 5 WPM one unit is 1.2/5 = 0.24 s, so a dot is 240 ms and a dash 720 ms. At 20 WPM one unit is 60 ms, a dot 60 ms and a dash 180 ms. At 40 WPM one unit is 30 ms, a dot 30 ms and a dash 90 ms. The pattern of dots and dashes never changes; only the durations scale by 1.2/W seconds per unit.

Related tools

Morse hides nothing, so pair it with a real cipher when a puzzle needs a secret. A shift cipher is the classic next step, available in the Caesar cipher tool. For a keyword-driven polyalphabetic cipher, use the Vigenère cipher. To scramble the alphabet with a custom mapping, including Atbash and affine variants, use the substitution cipher tool. A common CTF pattern is Morse on the outside wrapping one of these ciphers underneath.

Frequently asked questions

Is Morse code case sensitive?

No. Morse has no separate codes for uppercase and lowercase. a and A both encode as .-. Decoders conventionally output uppercase.

How do you write a space between words in Morse text?

On a real channel a word is separated by a 7-unit silence. In written form there is no single standard: a slash / or a wider gap between letter groups is common. The key is that a word gap is longer than a letter gap, which is longer than a symbol gap.

What is the fastest a human can send Morse?

Skilled operators copy 20 to 40 WPM comfortably. Contest records exceed 75 WPM by ear. At 40 WPM one unit is 30 ms, so a dot lasts 30 ms and the eye and ear are both near their limits.

Why does SOS not decode as three separate letters?

It does decode as S, O, S. As a distress signal it is often sent as one continuous ...---... with no letter gaps, treated as a single prosign. Written out with gaps it is ... --- ....

Can Morse carry punctuation and accented letters?

International Morse defines codes for common punctuation such as period (.-.-.-), comma (--..--) and question mark (..--..). Accented letters have some regional codes, but support varies and many tools omit them.