Encoding tool

Morse Code Translator

Translate text to Morse code and back, then play it as sound at your own speed, with an optional flashing light. Runs in your browser, uploads nothing.

Last updated

Morse code writes each letter as a pattern of short and long signals: dots and dashes. A Morse code translator turns text into those patterns and patterns back into text, and this one can also play them. E is a single dot, T is a single dash and S is three dots.

Direction
11 characters
10 characters

Runs in your browser. Nothing you type is uploaded.

Listen

Plays the Morse code at 15 words per minute: one dot lasts 80 ms, and it takes about 10 seconds. The flashing light is optional and off until you switch it on.

Type in the left box and it converts as you go. Choose Text to Morse to write text as dots and dashes, or Morse to text to read them back. Decode this sends the result back round the other way, so a round trip is one click. Press Play to hear it, drag Speed to change how fast it goes, and switch Light on to see it as a flashing square as well. The Morse alphabet is below the explanation.

How text becomes Morse code

  1. Take each letter, digit or punctuation mark of the text.
  2. Look up its pattern in the Morse alphabet. A is .-, a dot then a dash.
  3. Put a space between the patterns of one word.
  4. Put / between words, so the gap between them is clear.
TextMorse code
SOS... --- ...
Hi cat.... .. / -.-. .- -
Help!.... . .-.. .--. -.-.--
2026..--- ----- ..--- -....

Morse code has no lower case, so a and A are the same pattern. Digits are always five signals long, and the shortest letters, E and T, are the most common letters in English, which was the idea.

Reading Morse code

Read one letter at a time. A space ends a letter and a slash, a line break or three spaces ends a word. If you are listening, it is the same with silence: a short pause between letters and a longer one between words. The translator reports every pattern it does not know, as a ? in the text and in a list, instead of guessing.

How the speed works

Morse timing is set by the length of a dot. At 15 words per minute, a dot lasts 80 milliseconds. The other lengths are multiples of that.

PartLength
Dot1 dot
Dash3 dots
Gap inside a letter1 dot
Gap between letters3 dots
Gap between words7 dots

The speed in words per minute counts the word PARIS, which comes to exactly 50 dots with the gap after it. That makes a dot 1200 / WPM milliseconds long: 60 ms at 20 WPM and 240 ms at 5 WPM.

Morse code alphabet

Letters, digits and punctuation. The translator reads this same table, so what you see here is what it converts.

Letters
CharacterMorse codeCharacterMorse code
A.-N-.
B-...O---
C-.-.P.--.
D-..Q--.-
E.R.-.
F..-.S...
G--.T-
H....U..-
I..V...-
J.---W.--
K-.-X-..-
L.-..Y-.--
M--Z--..
Digits
CharacterMorse codeCharacterMorse code
0-----5.....
1.----6-....
2..---7--...
3...--8---..
4....-9----.
Punctuation
CharacterMorse codeCharacterMorse code
..-.-.-:---...
,--..--;-.-.-.
?..--..=-...-
'.----.+.-.-.
!-.-.----....-
/-..-._..--.-
(-.--.".-..-.
)-.--.-$...-..-
&.-...@.--.-.

Gotchas

  • Spacing matters. ... --- ... is SOS, and ...---... with no spaces is one pattern that is not in the alphabet. Put a space between letters.
  • Some characters have no Morse code. é, €, other alphabets and emoji show as ?, and the list under the boxes says which.
  • Morse code has one case. Decoding always gives upper case, so Hello comes back as HELLO.
  • Sound needs a click. Browsers do not allow a page to make sound until you have interacted with it, so Play is a button, and a phone on silent will stay silent.
  • The light flashes quickly. It is off until you switch it on, it follows the sound, and it is disabled if your device asks for reduced motion. Do not use it if flashing lights bother you.
  • Morse is not secret. It is another way of writing the same text. Anyone can translate it back, so do not use it to hide anything.

Common questions

How do I translate text to Morse code?

Type or paste the text into the left box with Text to Morse selected. Each letter, digit and punctuation mark is replaced by its pattern of dots and dashes, with a space between letters and a slash between words. SOS becomes ... --- ..., and Hi cat becomes .... .. / -.-. .- - with the slash between the two words. Press Copy to take the result with you.

How do I translate Morse code to text?

Switch to Morse to text and paste the dots and dashes. Put a space between letters and a slash, a line break or three spaces between words, so .... .. / -.-. .- - reads as HI CAT. The translator also accepts the dot and dash symbols some keyboards and websites use, such as the middle dot and the en dash.

How do I hear the Morse code?

Press Play under the boxes. It plays the Morse code as a steady tone, whichever box it is in, and Stop ends it at any point. Browsers only allow sound after you click something, which is why nothing plays until you press Play. Use the Speed slider to slow it down while you learn or speed it up to practise.

What does the speed in WPM mean?

WPM is words per minute, measured with the word PARIS, which is 50 dot lengths long counting the gap after it. At 20 WPM one dot lasts 1200 divided by 20, which is 60 milliseconds. A dash is three dots, the gap inside a letter is one dot, the gap between letters is three and the gap between words is seven. The slider runs from 5 to 40 WPM.

Can the Morse code flash a light?

Yes. Switch Light on and a square beside the Play button flashes in time with the tone, a bright flash for a dot or dash and dark for the gaps. It is off until you turn it on, because a flashing light can be unpleasant or unsafe for some people. If your device is set to reduce motion, the light is disabled and the sound still plays.

What happens to characters that have no Morse code?

They show as a question mark and are listed under the boxes, so you can see which ones were not converted. Morse code covers the English letters A to Z, the digits 0 to 9 and common punctuation. Accented letters such as é, other alphabets and emoji are not part of the international code. Morse also has only one case, so the text you get when you decode is always upper case.

What is the Morse code for SOS?

Three dots, three dashes and three dots: ... --- ... Sent without any gap between the letters it is the distress signal, which is why SOS is the best known Morse message. In this translator you will see a space between the letters, because that is how Morse is written down.

Is anything I type here sent to a server?

No. The translation and the sound are made in your browser, and neither box is submitted anywhere. The site records that the tool was used, in which direction, at which speed and how long the input was, so we know which tools are worth building next. The text itself is never part of that.

See all tools

Want this explained by a cat?

The videos cover the same ground in sixty seconds. If there is a tool you want built next, ask.