Morse Code Generator
Convert between text and Morse code with audio playback — learn, practice, and translate Morse code bidirectionally.
Example: .... . .-.. .-.. --- / .-- --- .-. .-.. -..
Audio playback uses Web Audio API (600 Hz tone).
Morse Code Chart
Reference chart showing the Morse code representation for each letter and number:
| Letter | Morse | Letter | Morse | Number | Morse |
|---|---|---|---|---|---|
| A | .- | N | -. | 1 | .---- |
| B | -... | O | --- | 2 | ..--- |
| C | -.-. | P | .--. | 3 | ...-- |
| D | -.. | Q | --.- | 4 | ....- |
| E | . | R | .-. | 5 | ..... |
| F | ..-. | S | ... | 6 | -.... |
| G | --. | T | - | 7 | --... |
| H | .... | U | ..- | 8 | ---.. |
| I | .. | V | ...- | 9 | ----. |
| J | .--- | W | .-- | 0 | ----- |
| K | -.- | X | -..- | ||
| L | .-.. | Y | -.-- | ||
| M | -- | Z | --.. |
How to Use the Morse Code Generator
This Morse code translator works bidirectionally, converting text to Morse code or Morse code back to text. It also plays Morse code audio using your browser's Web Audio API.
- Choose a mode: Select "Text to Morse" or "Morse to Text" using the tabs.
- Enter your input: Type text or Morse code in the input box.
- View the output: The conversion appears instantly in the output area.
- Play audio (Text to Morse only): Click "Play Audio" to hear the Morse code as beeps.
- Copy the result: Use the Copy button to copy the output to your clipboard.
What is Morse Code?
Morse code is a method of encoding text characters as sequences of dots (•) and dashes (—), represented as short and long signals. Developed in the 1830s-1840s by Samuel Morse and Alfred Vail for electric telegraph communication, it became the first digital encoding system for transmitting language.
Each letter of the alphabet and each digit is represented by a unique combination of dots and dashes. For example, the letter 'E' is a single dot (the most common letter gets the shortest code), while 'Q' is two dashes, a dot, and a dash (--.-). Morse code can be transmitted as sound, light, or written symbols.
Though largely replaced by modern communication technologies, Morse code remains in use for aviation, amateur radio, assistive technology for people with disabilities, and as a method of communication in extreme situations.
Morse Code Timing Standards
The timing relationships in Morse code are standardized:
- Dot duration: 1 unit (the base timing unit)
- Dash duration: 3 units (three times the length of a dot)
- Gap between symbols: 1 unit (within the same letter)
- Gap between letters: 3 units
- Gap between words: 7 units
This tool uses a dot duration of 60 milliseconds and a frequency of 600 Hz for audio playback, which are common standards for practice and learning.
Use Cases for Morse Code
- Learning and education: Practice and learn Morse code with audio feedback
- Amateur radio: Decode received Morse transmissions or prepare messages
- Emergency signaling: Use flashlights or sound to send SOS (... --- ...)
- Assistive technology: Some people with disabilities use Morse code for communication
- Puzzles and games: Create or solve Morse code challenges
- Secret messages: Send encoded messages to friends
- Maritime and aviation: Understand legacy navigation beacons