Morse Code Converter

Convert text to Morse code (.-) and back, supports Latin characters

Morse code: its encoding rules and timing standard

It is not a fixed-length code

Morse code represents characters with two signals (a short dot and a long dash), but each character uses a different number of signals. The letter E is a single dot and T is a single dash, while digits are uniformly 5 signals and most punctuation is 6.

The design follows the same idea as Huffman coding: the more frequent a letter is in English, the shorter its encoding. E, T, A, I and N are 1-2 signals, while Q, Y and Z are 4. This keeps the average length of a message as short as possible.

The timing standard (ITU-R M.1677)

Morse is about duration ratios, not absolute speed. Taking the length of one dot as 1 unit:

ElementDuration (units)
Dot1
Dash3
Gap within a character1
Gap between characters3
Gap between words7

So ...---... is SOS with no spaces between characters, while ... --- ... is written with the word boundaries shown. The receiving operator tells characters from words purely by the gap length — get the gaps wrong and the same signal string decodes to completely different content.

Why ambiguity appears

Without the inter-character spaces, a string of dots and dashes is not uniquely decodable. For example, .... can be H (four dots), or EEEE, or IE, or SI, depending on where you split. Real telegraphy removes that ambiguity with strict timing (or explicit separators).

This is also the caution for plain-text conversion: the encoding must emit separators, or decoding cannot guarantee recovery. Some tools separate characters with a space and words with /; others use a single space between characters and three spaces between words. Agree on the convention before exchanging data.

Where it still shows up

The tool converts text and Morse in both directions, with an optional character separator (space or /), is case-insensitive, and runs entirely in your browser.

FAQ

Does it support Chinese?

Morse code only defines English letters, digits, and common symbols. Chinese cannot be converted directly and is skipped.