Morse code converter
Convert text to Morse code and back: letters, digits and common punctuation, an unknown-character policy (skip, error or keep) and optional Web Audio playback.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Letters are separated by spaces and words by /; playback uses 1 unit for a dot, 3 for a dash, 3 between letters and 7 between words.
What this tool does
- Turn plain text into Morse code you can send or key in by hand: letters are separated by spaces and words by /, so you do not have to remember the conventions.
- Decode a stream of dots and dashes: besides . and -, full-width look-alikes such as ·, — and − are normalised too, so text copied from a web page or chat still decodes.
- Hear the actual rhythm: after decoding, press Play tones and Web Audio beeps it out with the standard 1-unit dot, 3-unit dash, 3-unit letter gap and 7-unit word gap.
- Handle unsupported characters (Chinese, emoji, rare symbols) with a skip / error / keep policy, which is handy when only part of the string is encodable.
Example
Input
HELLO WORLD
Output
.... . .-.. .-.. --- / .-- --- .-. .-.. -..
Text is upper-cased before the table lookup. Paste the Morse back in and you get HELLO WORLD again.
Frequently asked questions
Can Chinese characters or emoji be converted to Morse?
Not directly. International Morse covers A–Z, 0–9 and a handful of punctuation, so Chinese has to go through pinyin or a numeric code first. The default policy skips such characters; switch the unknown-character policy to Keep as-is to see which ones were dropped.
Where exactly do the spaces go?
Within a letter the dots and dashes must touch (S is ...), letters are separated by one space and words by a slash plus a space. Decoding follows the same rule, so "... --- ..." is SOS while "...---..." is treated as a single unknown code.
Does the playback match real Morse timing?
Yes, it uses the ITU ratios: a dot lasts 1 unit, a dash 3, the gap between letters 3 and between words 7, with 1 unit = 90 ms by default. The result is a steady fixed-pitch beep at a comfortable speed.
Some tables online disagree with this one — why?
The disagreements are usually about punctuation: ITU defines & as .-... and @ as .--.-., while informal amateur usage varies. This tool sticks to the 54 characters of ITU-R M.1677 and applies your unknown-character policy to anything else.
Is anything sent to a server?
No. Encoding, decoding and playback all run locally in the browser, the page makes no network requests, and neither the text nor the code is logged.
Keywords:摩斯电码morse code摩尔斯电报码sos编码解码telegraph音调