morse_encoder.ts

Morse Code Encoder & Decoder

Type text or Morse code, convert instantly, hear audio playback. Free, private.

InstantFreePrivateAudio
morse — encoder & decoder
INPUT
0 chars
OUTPUT
0 chars
Morse Code Alphabet

Full A-Z, 0-9 reference with dots and dashes

0-----
1.----
2..---
3...--
4....-
5.....
6-....
7--...
8---..
9----.
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--..
Famous Morse Messages

Click to load into the input field

Morse Code History

From the telegraph to modern usage

1837Samuel Morse co-invented the electric telegraph with Alfred Vail.
1844"What hath God wrought" — the first telegraph message sent from Washington to Baltimore.
1865The International Telecommunication Union (ITU) standardized International Morse Code.
1912The Titanic transmitted SOS distress signals using Morse code as it sank.
1999The US Navy officially retired Morse code for communication purposes.
2024+Morse code remains used in amateur radio, aviation beacons, and accessibility tools.

What is Morse Code?

Morse code is a character-encoding system that represents each letter and numeral as a unique sequence of short signals (dots) and long signals (dashes). Invented in the 1830s by Samuel Morse and Alfred Vail, it was originally designed for the electric telegraph and became the global standard for long-distance communication for over a century. Each letter, digit, and select punctuation mark is represented by a unique combination of dots (.) and dashes (-).

Unlike modern digital encoding systems that use binary (0s and 1s), Morse code relies on three elements: dots, dashes, and gaps of silence. This simplicity enables transmission across an extraordinary range of media — electrical pulses on a wire, blinking lights, audio tones, flags, even tapping on a surface. This versatility is precisely why Morse code retains practical value in emergency situations and amateur radio even in the 21st century.

How Morse Code Works

Morse code works on a straightforward principle: each character is assigned a unique sequence of short and long signals. The fundamental timing rules are:

  • Dot (dit): The basic time unit — 1 unit
  • Dash (dah): 3 time units long
  • Gap between elements within a character: 1 unit of silence
  • Gap between characters: 3 units of silence
  • Gap between words: 7 units of silence

Samuel Morse designed the code cleverly by assigning shorter sequences to the most frequently used letters. For example, E — the most common letter in English — is a single dot (.), while T is a single dash (-). Less common letters like Q (--.-) require longer sequences. This frequency-based design minimizes total transmission time.

In this tool, text-to-Morse mode converts each character to its Morse equivalent, separating letters with spaces and words with /. Morse-to-text mode reverses the process, reading dot-dash sequences and mapping them back to alphanumeric characters.

The Morse Code Alphabet

International Morse Code covers the 26 Latin letters (A-Z), 10 numerals (0-9), and several punctuation marks. Each character has a unique sequence that cannot be confused with any other. Here are some key characters with memory aids:

CharacterMorseMemory aid
E.Shortest — the most common letter
T-Single dash
S...Three dots — easy to remember
O---Three dashes — part of SOS
SOS... --- ...International distress signal

Refer to the "Morse Code Alphabet" card above for the complete reference table covering all 36 basic characters and their Morse equivalents.

History of Morse Code

Morse code was developed in the 1830s as part of the electric telegraph system. The first telegraphic message — "What hath God wrought" — was sent on May 24, 1844, from Washington, D.C. to Baltimore, Maryland. This event marked a turning point in the history of telecommunications, enabling near-instant communication over hundreds of miles for the first time.

Throughout the 19th and early 20th centuries, Morse code was the backbone of long-distance communication. It was used extensively on ships, in military operations, and along railroad lines. The distress signal SOS (... --- ...) became famous after the RMS Titanic disaster in 1912, when telegraph operators transmitted SOS calls that helped save over 700 passengers.

By the late 20th century, the rise of satellite communication, digital networking, and automated systems gradually replaced Morse code in commercial contexts. In 1999, the United States Navy officially retired Morse code. The Global Maritime Distress and Safety System (GMDSS) replaced Morse for maritime safety. However, amateur radio operators worldwide continue to use Morse code (known as CW, for Continuous Wave) as a preferred mode of operation.

Modern Uses of Morse Code

Despite being largely retired from professional communication, Morse code maintains a surprising presence in modern technology and culture:

  • Amateur Radio (Ham Radio): Many ham radio operators use Morse code (CW) because it is highly efficient at low power levels and can be decoded by the human ear even when signals are extremely weak or buried in noise. CW requires far less bandwidth than voice communication.
  • Accessibility: Google integrated a Morse code keyboard into the Gboard app for Android, allowing people with limited motor function to type using just two buttons (dot and dash). This is an important accessibility tool that leverages the simplicity of Morse code for text input.
  • Aviation: Non-directional beacons (NDBs) around the world still broadcast their identifier in Morse code so that pilots can verify they are tuned to the correct frequency. VOR navigation stations also use Morse identification.
  • Education and STEM: Morse code is frequently taught in scouting programs, science clubs, and STEM activities. It provides an excellent introduction to concepts like encoding, signal processing, and information theory.
  • Emergency signaling: In survival situations, Morse code can be transmitted with a flashlight, mirror, whistle, or even by tapping. The SOS signal (... --- ...) is universally recognized and requires no special equipment to send or receive.
  • Art and jewelry: Morse code is used in jewelry design and art to encode personal messages. Bracelets and necklaces featuring round beads (dots) and elongated beads (dashes) that spell names, dates, or meaningful words have become a popular trend.

About Developer Tools

Developer tools automate the repetitive parts of software work: formatting JSON, encoding/decoding Base64, decoding JWTs to verify token claims, generating UUIDs, formatting XML, diffing configurations. These aren't glamorous tasks, but they're the friction points that eat 10-15 minutes multiple times a day — adding up to hours weekly. Running them in a clean browser tab beats wrestling with CLI dependencies or IDE extensions that might ship your private data to a third party.

Why it matters

Fast, client-side developer tools fundamentally matter because they're used with sensitive data. JWT tokens contain user identity. Base64 payloads might encode API keys. JSON dumps include customer records. If a 'developer tool' sends your input to a server to process, you've just leaked production secrets. ZestLab's dev tools run 100% client-side with no network calls after page load — what you paste stays in your browser.

Privacy and safety

All developer tools here execute in-browser using pure JavaScript. There's no 'decode server' or 'format API' — your JWT, your JSON, your encoded payload is parsed by code running on your laptop. Verify this yourself with browser DevTools → Network tab: you'll see zero outbound requests when using any tool. That's a standard we hold because dev tools handle secrets.

Best practices

  • Never paste production JWT or API tokens into ANY online tool without verifying it runs client-side (check the Network tab)
  • Use browser private/incognito mode for one-off decoding of sensitive payloads
  • Bookmark tools you use daily — ZestLab tool URLs are stable and don't require accounts
  • When formatting JSON with secrets for team review, redact credentials before sharing the formatted output