Menu

Morse Code Translator

Translate text to Morse code and back - with audio playback.

By Nethanel Bar, Co-founder & CEO

Last updated

Ready to actually learn to code?

Coddy teaches you by writing real code in your browser - interactive lessons, instant feedback, and AI help when you get stuck.

What is a Morse code translator?

A Morse code translator converts ordinary text into Morse code - the pattern of short and long signals (dots and dashes) used in telegraphy and radio - and converts Morse back into readable text. Each letter, digit, and punctuation mark has its own unique sequence of dots (·) and dashes (−).

In written Morse, a dot is . and a dash is -. Letters within a word are separated by a single space, and words are separated by a slash /. So SOS is ... --- ..., and SOS Coddy becomes ... --- ... / -.-. --- -.. -.. -.--.

Beyond writing it out, this tool can *play* the code aloud using authentic timing - a dash lasts three times as long as a dot, with precise gaps between letters and words - so you can learn Morse by ear. Everything runs locally in your browser.

What you'll learn about Morse code

  • A dot (dit) is one time unit; a dash (dah) is three units long.
  • The gap between symbols in a letter is 1 unit, between letters 3 units, and between words 7 units.
  • The most common letters have the shortest codes: E is a single dot, T is a single dash.

How to translate Morse code step by step

  1. Pick a direction

    Choose Text → Morse to encode, or Morse → Text to decode dots and dashes back into letters.

  2. Type or paste your input

    Enter any text, or paste Morse using dots and dashes with spaces between letters and a slash ( / ) between words.

  3. Play it aloud (optional)

    Press Play to hear the Morse code as beeps with correct dit/dah timing - a great way to practice by ear.

  4. Copy or swap

    Copy the result with one click, or hit swap to reverse the conversion on the current output.

Morse code alphabet reference

The full International Morse code mapping for letters and digits.

CharacterMorseCharacterMorse
A.-N-.
B-...O---
C-.-.P.--.
D-..Q--.-
E.R.-.
F..-.S...
G--.T-
H....U..-
I..V...-
J.---W.--
K-.-X-..-
L.-..Y-.--
M--Z--..
1.----6-....
2..---7--...
3...--8---..
4....-9----.
5.....0-----

Examples to try

The distress signal

Paste a small example into the tool and change one part at a time.

Encodes to ... --- ... - three dots, three dashes, three dots.

A word with a space

Copy the original value, run the tool, then compare the result.

Words are separated by / , so you get .... .. / - .... . .-. ..

Decode dots and dashes

Take a value from your own work and use this tool to inspect or prepare it.

Paste this in Morse → Text mode to get LOVE.

Common mistakes

  • Forgetting the word separator - use a slash ( / ) between words so the decoder knows where one word ends.
  • Running letters together - each letter's dots and dashes must be separated from the next by a space.
  • Mixing up dot/dash counts - reversing a couple of symbols turns one letter into a completely different one (E vs T, A vs N).

Morse Code Translator FAQ

How do I write text in Morse code?
Type your text in Text → Morse mode. Each character is replaced by its dot-and-dash code, letters separated by spaces and words by a slash ( / ).
How do I decode Morse code back to text?
Switch to Morse → Text mode and paste your dots and dashes. Separate letters with a space and words with a slash; the tool converts them back to readable text.
Can I hear the Morse code?
Yes - press Play to hear the code as beeps with authentic timing (a dash is three times as long as a dot). It's a great way to learn Morse by ear.
Does it support numbers and punctuation?
Yes. The translator covers A–Z, 0–9, and common punctuation such as period, comma, question mark, and slash.
What is the SOS Morse code?
SOS is ··· −−− ··· (dot-dot-dot, dash-dash-dash, dot-dot-dot). It's the international distress signal, chosen because it's short and hard to misread.

Other developer tools

Coddy programming languages illustration

Learn to code with Coddy

GET STARTED