Morse Code Generator

Convert between text and Morse code with audio playback — learn, practice, and translate Morse code bidirectionally.

Example: .... . .-.. .-.. --- / .-- --- .-. .-.. -..

Morse Code

Audio playback uses Web Audio API (600 Hz tone).

Morse Code Chart

Reference chart showing the Morse code representation for each letter and number:

LetterMorseLetterMorseNumberMorse
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.

  1. Choose a mode: Select "Text to Morse" or "Morse to Text" using the tabs.
  2. Enter your input: Type text or Morse code in the input box.
  3. View the output: The conversion appears instantly in the output area.
  4. Play audio (Text to Morse only): Click "Play Audio" to hear the Morse code as beeps.
  5. 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

Frequently Asked Questions

What is SOS in Morse code?
SOS is ... --- ... (three dots, three dashes, three dots). It's the international distress signal, chosen because the pattern is distinctive and easy to recognize.
Can I learn Morse code with this tool?
Yes. Use the reference chart and audio playback to practice. Start by memorizing common letters (E, T, A, O, I, N) and gradually build up to full words and sentences.
How do I type Morse code for the Morse to Text mode?
Use periods (.) for dots and hyphens (-) for dashes. Separate letters with spaces and words with forward slashes (/). Example: ".... . .-.. .-.. --- / .-- --- .-. .-.. -.." translates to "HELLO WORLD".
Does Morse code support punctuation and special characters?
Yes, though this basic implementation focuses on letters and numbers. Full Morse code includes codes for punctuation like periods, commas, question marks, and more.
Why doesn't the audio work on my device?
Audio playback requires Web Audio API support. Most modern browsers support it, but it may be disabled on some mobile devices or in privacy-focused browser modes.
Is Morse code case-sensitive?
No. Morse code does not distinguish between uppercase and lowercase letters. 'A' and 'a' both use the same code: .-