Morse Code Encoder (Text to Morse Code)
Convert alphabet letters, numbers, and punctuation into International Morse Code, with an audio playback feature that beeps out the signal.
Morse Code Reference Table
Letters
| Character | Code |
|---|---|
| A | .- |
| B | -... |
| C | -.-. |
| D | -.. |
| E | . |
| F | ..-. |
| G | --. |
| H | .... |
| I | .. |
| J | .--- |
| K | -.- |
| L | .-.. |
| M | -- |
| N | -. |
| O | --- |
| P | .--. |
| Q | --.- |
| R | .-. |
| S | ... |
| T | - |
| U | ..- |
| V | ...- |
| W | .-- |
| X | -..- |
| Y | -.-- |
| Z | --.. |
Numbers
| Character | Code |
|---|---|
| 0 | ----- |
| 1 | .---- |
| 2 | ..--- |
| 3 | ...-- |
| 4 | ....- |
| 5 | ..... |
| 6 | -.... |
| 7 | --... |
| 8 | ---.. |
| 9 | ----. |
Punctuation
| Character | Code |
|---|---|
| . | .-.-.- |
| , | --..-- |
| ? | ..--.. |
| ' | .----. |
| ! | -.-.-- |
| / | -..-. |
| ( | -.--. |
| ) | -.--.- |
| & | .-... |
| : | ---... |
| ; | -.-.-. |
| = | -...- |
| + | .-.-. |
| - | -....- |
| _ | ..--.- |
| " | .-..-. |
| $ | ...-..- |
| @ | .--.-. |
Tips
- Letters within a word are separated by a space, and words are separated by a slash ("/") — a common international convention for written Morse code.
- Characters not in the reference table (such as non-Latin scripts) are skipped automatically; only Latin letters, digits, and common punctuation are supported.
- The "Play Audio" button generates the beeps live using the Web Audio API — dots are short beeps and dashes are three times as long, matching the standard timing ratio.
- Input is case-insensitive: "hello" and "HELLO" produce the exact same Morse code.
- SOS ("... --- ...") is one of the most recognizable Morse patterns and a common starting point for learning the code.
Frequently Asked Questions
Side Note — The Telegraph Era That Gave Us Morse Code
Morse code was devised in the 1830s by Samuel Morse, an American painter turned inventor, together with his assistant Alfred Vail, as they worked to make the electric telegraph practical. In 1844, the first official Morse-coded telegraph message — "What hath God wrought" — was sent between Washington, D.C. and Baltimore, marking a turning point in the history of communication.
Morse's original code (now called American Morse Code) used subtly different spacing for different letters, making it fairly complex. It was later simplified and standardized in Europe, and the resulting "Continental Morse Code," established around 1865, became the basis for the International Morse Code used worldwide today.
By the 20th century, Morse code had become a lifeline of maritime communication. During the sinking of the Titanic in 1912, wireless operators kept sending the CQD and SOS distress signals in Morse code, an event that helped shape later international communication regulations. Commercial use of Morse code ended in 1999, but it lives on as a skill passed down among amateur radio enthusiasts.