Morse Code Converter

Convert Text to Morse and vice versa
Conversion Direction
Audio Settings
Visual Settings
Timing Settings
What is the Morse code for 'A'?
.--.
.-
-...
-.-.
Score: 0 / 0
Morse Code API

Use our simple API to convert text to Morse code programmatically:

Endpoint: (Use the functions directly in your JavaScript code)

Text to Morse:
textToMorse(text, options)

Morse to Text:
morseToText(morseCode, options)

Options:
{ dotDuration: 50, // ms dashDuration: 150, // ms pauseDuration: 50 // ms }

Example usage:

// Convert text to Morse
const morse = textToMorse("Hello");
console.log(morse); // ".... . .-.. .-.. ---"

// Convert Morse to text
const text = morseToText(".... . .-.. .-.. ---");
console.log(text); // "HELLO"
Morse Code Basics

Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes.

Letters
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
1: .----   2: ..---   3: ...--   4: ....-   5: .....
6: -....   7: --...   8: ---..   9: ----.   0: -----
Punctuation
.: .-.-.-   ,: --..--   ?: ..--..   ': .----.   !: -.-.--
/: -..-.   :: ---...   ;: -.-.-.   =: -...-   +: .-.-.
-: -....-   _: ..--.-   ": .-..-.   $: ...-..-   @: .--.-.
Timing
  • Dot: 1 unit
  • Dash: 3 units
  • Space between parts of the same letter: 1 unit
  • Space between letters: 3 units
  • Space between words: 7 units