Morse Code Encoder / Decoder

Encoding Client-side morse encoder decoder telegraph dots dashes sound

This tool runs entirely client-side, in your browser: your data is never sent anywhere.

What it does

Morse code represents letters, numbers, and punctuation as sequences of short and long signals — traditionally called dots (.) and dashes (-). This tool converts plain text into Morse code, and Morse code back into plain text, entirely in your browser. You can also play the encoded message as audible beeps, just like a real telegraph operator would hear.

Try it

How it works

  1. Encoding: each character of the input text is looked up in the International Morse Code table and replaced by its dot/dash sequence. Letters within a word are separated by a single space, and words are separated by a slash (/).
  2. Decoding: the Morse input is split on / to find word boundaries, then each space-separated token is looked up in the reverse table to recover the original letter.
  3. Playback: dots and dashes are converted into short and long tone bursts using the Web Audio API (OscillatorNode), timed according to standard Morse timing rules:

Reference table

CharacterMorseCharacterMorse
A.-0-----
B-...1.----
C-.-.2..---
D-..3...--
E.4....-
F..-.5.....
G--.6-....
H....7--...
I..8---..
J.---9----.
K-.-..-.-.-
L.-..,--..--
M--?..--..
N-.'.----.
O---!-.-.--
P.--./-..-.
Q--.-(-.--.
R.-.)-.--.-
S...&.-...
T-:---...
U..-;-.-.-.
V...-=-...-
W.--+.-.-.
X-..---....-
Y-.--_..--.-
Z--..".-..-.

Notes