Back to the blog

Developer

Morse code, written and played.

Translate text to Morse code or Morse back to text in your browser, as ITU-R M.1677-1 sets it out, and hear it as beeps. Nothing is uploaded.

By 3 min read

A developer toolkit reading encoded text in two steps, URL decode then Base64 decode, to give Hello, world!

Morse code writes each letter as dots and dashes. The Morse code translator writes it as the ITU's recommendation sets it out, reads it back, and plays it.

Text to Morse.

Type text and each letter becomes its dots and dashes, with a space between letters and a slash between words: HELLO WORLD is .... . .-.. .-.. --- / .-- --- .-. .-.. -.. and SOS is ... --- ...

Morse has no small letters, so everything is read as capitals. Letters, figures and the punctuation the ITU lists have codes; anything else, such as ! or an accented letter, is named in a note and left out.

Morse to text.

Paste dots and dashes to read them. Letters are apart by a space, and words by a slash, a bar or three spaces; middle dots, long dashes and underscores are read as dots and dashes too.

A code that is not a letter in ITU Morse stops the reading, and the page names it, rather than guessing what was meant.

Hear it played.

Press Play the Morse to hear what you wrote as a 600 Hz tone at 18 words a minute. A dot lasts one unit and a dash three, with gaps of one unit inside a letter, three between letters and seven between words.

Speed is counted by the word PARIS, which takes 50 units, so at 18 words a minute a unit is 1.2 ÷ 18 seconds, about 67 milliseconds. The tone is made by your browser as it plays; nothing is recorded or downloaded.

Nothing leaves your browser.

Everything is worked out on your device: what you type or paste is never sent anywhere, and nothing is kept when you leave.

Morse code is one step of the Developer toolkit, beside binary, Roman numerals and Unix time.

Further reading

Topics: morse code translator · text to morse code · morse code to text · morse code alphabet · morse code sound · sos in morse code · itu morse code

A little less theory. A little more doing.

Try it on your own terms, with a free browser tool.

Try the tool