Skip to the tool
DevToolBench

Morse Code Translator

Text to Morse and back, with the whole ITU table on the page.

Characters
0
Time units
0
On air at 20 wpm
0.0 s
Table size
54

Time units count the dots, dashes and the silences between them. Nothing here plays sound: this is a translator, not a keyer.

The full alphabet, all 54 characters

Letters

A
.-
B
-...
C
-.-.
D
-..
E
.
F
..-.
G
--.
H
....
I
..
J
.---
K
-.-
L
.-..
M
--
N
-.
O
---
P
.--.
Q
--.-
R
.-.
S
...
T
-
U
..-
V
...-
W
.--
X
-..-
Y
-.--
Z
--..

Digits

0
-----
1
.----
2
..---
3
...--
4
....-
5
.....
6
-....
7
--...
8
---..
9
----.

Punctuation (ITU-R M.1677-1)

.
.-.-.-
,
--..--
:
---...
?
..--..
'
.----.
-
-....-
/
-..-.
(
-.--.
)
-.--.-
"
.-..-.
=
-...-
+
.-.-.
@
.--.-.

Punctuation in common use, outside the recommendation

!
-.-.--
&
.-...
;
-.-.-.
_
..--.-
$
...-..-

Everything runs in your browser. Nothing you type is sent to a server.

Found a bug in this tool? Report it.

Share this tool

What this tool does

This Morse code translator goes both ways: type a sentence and get the dots and dashes, or paste dots and dashes and get the sentence back. It covers the complete ITU alphabet — 26 letters, 10 digits and 18 punctuation marks — and the whole table is printed on this page so you can check any character against it without trusting the box above.

You choose how the output is written. Dots and dashes can come out as the plain full stop and hyphen you would type, or as · and for reading. Words can be divided by a spaced slash or by three spaces. Decoding accepts all of those, mixed, because Morse copied from somewhere else usually is.

Nothing plays sound. This translates written Morse, counts the timing, and stops there.

The silences are the code

Morse has three symbols, not two: the dot, the dash, and the absence of either. The standard fixes their lengths in time units. A dot is one unit. A dash is three. The gap between elements inside one letter is one, the gap between letters is three, and the gap between words is seven.

That is why the separator matters so much when Morse is written down rather than sent. .... .. is HI, and . . .. - is EEIT — the same six elements, differing only in where the silences fall. A translator that loses the gaps produces something readable and wrong, so this one keeps letters one space apart and words a slash apart, and refuses to guess when the input has neither.

The time units also give you the standard measure of speed. PARIS, with the word gap that follows it, is exactly 50 units, which is the definition of one word for the purposes of words per minute. Divide 1.2 by the speed in words per minute and you get the length of a single unit in seconds: at 20 wpm a dot lasts 60 milliseconds. The panel above reports both the unit count of your message and how long it would occupy the air.

Variable-length codes, forty years before Huffman

Samuel Morse and Alfred Vail did something in the 1840s that information theory would only formalise in 1952: they gave common symbols short codes and rare symbols long ones. E, the most frequent letter in English, is a single dot. T is a single dash. Meanwhile Q is --.- and the digit 0 is five dashes.

David Huffman's algorithm produces the optimal such code for a known frequency distribution, and Morse is a rough, hand-made version of the same idea. It is not optimal — the letter O is three dashes despite being common, and the digits are all five elements long for symmetry rather than for efficiency — but the instinct was right, and it is why Morse is faster to send than any fixed-length scheme of the same alphabet.

It is also why Morse is not self-delimiting the way a Huffman code is. Huffman codes are prefix-free by construction: no code is the start of another, so a stream can be split with no separators. In Morse, E's dot is the start of I, S and H, so the gaps have to be transmitted. Morse traded the prefix-free property for shorter symbols and paid for it with silence.

Where the alphabet came from

The version everyone uses is not the original. American Morse, used on land telegraph lines, had internal spaces inside some letters and varying dash lengths, which survived a wire but not radio. The Continental version tidied that up, and the ITU standardised what became International Morse — the table this tool implements, kept current in Recommendation ITU-R M.1677-1.

Need to see text as raw bits rather than as rhythm? The text to binary converter shows the fixed-length encoding Morse deliberately is not.

Frequently asked questions

What is SOS in Morse code?

Three dots, three dashes, three dots — ... --- ... — sent as one unbroken run with no letter gaps, which is why it is written SOS with a bar over it. It was adopted in 1906 because that pattern is impossible to mistake and easy to send under pressure, not because it stands for anything. Save Our Souls and Save Our Ship were invented afterwards to explain a sequence that was chosen purely for its rhythm.

Why are E and T the shortest letters?

Because they are the most frequent letters in English. Alfred Vail is said to have counted the type in a Morristown newspaper's cases to rank the letters, then handed the shortest signals to the ones that appear most: E is a single dot, T a single dash. Q and Y, which barely turn up, cost four elements each. It is a compression scheme built by hand a century before anybody wrote the theory down.

How do I separate words in Morse code?

With a gap of seven time units, which in writing becomes a slash or three spaces. The gap between two letters is three units, and the gap between the dots and dashes inside one letter is a single unit. Those three silences do all the work of punctuation: without them, HI and EEIT are the same six elements.

Does this Morse code translator play sound?

No. It converts between text and written Morse and shows how long the message would take on air, but nothing is played, flashed or keyed. If you want to learn to hear Morse rather than read it, a dedicated practice program with adjustable Farnsworth spacing will serve you far better than an audio button bolted onto a converter.

Which punctuation marks does it support?

The thirteen in ITU-R M.1677-1 — full stop, comma, colon, question mark, apostrophe, hyphen, slash, both brackets, inverted commas, equals, plus and the at sign added in 2004 — plus five that amateurs use without the recommendation blessing them: exclamation mark, ampersand, semicolon, underscore and dollar. The table on the page labels which group each one belongs to.

Related tools

Updated