Paul Lockett

Morse Code Translator



If you enter text in the text box above and click the "Convert Text to Morse Code" button, it will do precisely that. It will also work in reverse and convert Morse Code to text.

In the output, I have set it to use vertical bars (|) to represent dashes and apostrophes (') to represent dots, as I found it was clearer where the spaces were than when I used hyphens (-) and full stops (.). The input section will allow you to use either approach, so if you prefer to use (.--.) notation rather than ('||'), it will work.

The gap between letters is represented by a space and the gap between words is represented by a tilde (~).

You can re-use the code in this page under the terms of the Mozilla Public Licence v2.0. See the licence notice in the source of the page for more details.
Valid HTML 4.01 Strict and CSS