This is just for fun. The first box is where you would enter your text. Don't add any punctuation marks because Morse code does not support them. The second box is where the converted text displays as dots and dashes. You can also paste a bit of Morse code in the bottom box and convert it to text. The converted text will be in upper case and carriage paragraph separations will be preserved. Any special characters other than dots dashes will be inserted unchanged.

The rules for Morse code are as follows:
The duration of the pulse/tone for a dash is three times as long as the time used for a dot.
A space between the dots and dashes that are used to represent a letter is also equal to the duration of one dot.
The space between letters is equal to the duration of three dots.
The space between two words is equal to the duration of five dots.
Thus if a dot lasts for 100ms, a dash would be 300ms, space between dots and dashes of one letter would be 100ms, space between letters would be 300ms, and the space between words would be 500ms.

In order for this to work, your browser must allow JavaScrip to run. I'm sure that someone could optimize the script and improve it. I did this just for fun, not to show off so use it for fun.

Enter the text to convert:

Converted Morse Code: