How does Morse code translation work?
Morse code represents each letter, digit and punctuation mark as a short pattern of dots and dashes. Translating text means swapping every character for its pattern, with gaps between letters and longer gaps between words. This translator writes letters separated by a space and words separated by /, and decodes that same format back into text.
The international version of the code is defined by the ITU in Recommendation ITU-R M.1677-1, which still governs its use in radio communications.
Translating text to Morse
- Leave Direction set to Text → Morse.
- Type your message. Case doesn't matter.
- Click Convert and copy the dots and dashes.
Hello World gives:
.... . .-.. .-.. --- / .-- --- .-. .-.. -..
and Call 911! gives -.-. .- .-.. .-.. / ----. .---- .---- -.-.--. Each digit is always five symbols long, which makes numbers easy to spot in a stream of code.
Decoding Morse to text
- Switch Direction to Morse → Text.
- Enter the code with at least one space between letters and
/(space, slash, space) between words. - Click Convert. Output is in capitals, since Morse has no letter case.
-- --- .-. ... . / -.-. --- -.. . decodes to MORSE CODE. The spaces around the slash are optional, so .... ../.-- reads as HI W, and a line break also counts as a word gap. Extra slashes and spaces are ignored rather than turned into empty words.
Timing: what the spaces represent
On air, Morse isn't written down. It's a sequence of on and off signals, and the ITU recommendation defines everything relative to the length of one dot:
| Element | Length |
|---|---|
| Dot | 1 unit |
| Dash | 3 units |
| Gap between the dots and dashes of one letter | 1 unit |
| Gap between letters | 3 units |
| Gap between words | 7 units |
The single space and the / in this tool are written stand-ins for the three-unit and seven-unit gaps. When you transcribe code by ear, the word gap is the long pause that's noticeably longer than the pause between letters.
Supported characters
The translator knows the 26 letters plus É (..-..), 10 digits and 18 punctuation marks:
| Character | Code | Character | Code |
|---|---|---|---|
. |
.-.-.- |
, |
--..-- |
? |
..--.. |
' |
.----. |
! |
-.-.-- |
/ |
-..-. |
( |
-.--. |
) |
-.--.- |
& |
.-... |
: |
---... |
; |
-.-.-. |
= |
-...- |
+ |
.-.-. |
- |
-....- |
_ |
..--.- |
" |
.-..-. |
$ |
...-..- |
@ |
.--.-. |
Most of these come straight from the ITU list. !, ;, _, $ and & are widely used extensions that aren't in the ITU table; in the ITU recommendation, .-... is the "wait" signal, which this tool reads as &. The ITU sends the multiplication sign × with the same code as X (-..-), so 2×3 becomes ..--- -..- ...-- and decodes back as 2X3. Curly quotes and apostrophes pasted from a word processor are sent as their plain equivalents. Accented letters typed as a plain letter plus a combining accent are joined first, so either form of é works.
Errors and edge cases
The translator would rather stop and tell you than quietly change your message. Where it can't translate something, the output box is cleared and an error names the problem:
- Unsupported characters are listed.
café #1gives "There is no Morse code for "#"." Remove or replace the listed characters and convert again.éitself is fine, since the ITU defines..-..for it, but%,*,ü,ßand emoji have no code. - Whitespace is tidied, not translated. Any run of spaces, tabs or line breaks between words becomes a single
/, and spaces at the start or end are ignored.Hiandthereon two lines translate as.... .. / - .... . .-. .. - Unknown codes are listed when decoding. A typo such as
.-.-(not in the table) or letters run together, like...---...for SOS without spaces, give an error that quotes the group, so you can see exactly which part to fix. - Only
.and-count. Bullets (•), underscores used as dashes, or the words "dit" and "dah" aren't recognised, and are reported as unknown codes. - No prosigns. Procedural signals like SK (
...-.-) aren't in the table and are reported as unknown. Written with spaces between the letters they come out as their separate letters. AR (.-.-.) shares its code with+, so it decodes as+.
Related tools
Morse is one of the oldest binary-style encodings, with two symbols standing in for two states. If you're curious about the modern equivalents, text to binary shows how computers spell the same letters with 1s and 0s, and text to ASCII gives the numeric code behind each character. For other playful text transformations, try the upside-down text generator.
Last updated