Morse Code Encoder

Translates letters, digits, and common punctuation into International Morse code, dots and dashes space-separated within each letter, a slash separating words. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-22

Overview

Introduction

Morse code remains a recognizable and fun encoding for puzzles, amateur radio practice, and novelty messages.

This tool translates plain text into it instantly.

What Is Morse Code Encoder?

A translator covering the International Morse code alphabet: all 26 letters, digits 0-9, and common punctuation.

It runs entirely client-side as part of this site's String Tools collection, so nothing you paste is ever uploaded to a server.

How Morse Code Encoder Works

Each character is looked up in a Morse code table and its dot/dash pattern is emitted; letters within a word are joined by spaces, and words are joined by a slash.

The transformation happens synchronously in JavaScript the moment you type, with no network round trip involved.

When To Use Morse Code Encoder

Use it for puzzle or escape-room content, amateur radio practice material, or just for fun.

It's a fast way to get the answer without opening a code editor, a REPL, or writing a one-off script just to check.

Often used alongside Morse Code Decoder.

Features

Advantages

  • Covers letters, digits, and common punctuation, not just the alphabet.
  • Reports exactly which characters aren't supported instead of silently dropping them.
  • Shares its character table with the decoder, so anything this tool can encode is guaranteed to decode back to the same text.

Limitations

  • Doesn't represent Morse code's actual timing (dot/dash duration and spacing); it's a written/visual representation only.
  • Covers the International Morse set only, so accented letters and characters from other alphabets have no mapping and are rejected outright.

Examples

Encoding a distress signal

Input

SOS

Output

... --- ...

Each letter's dot-dash pattern is looked up and joined by spaces.

Best Practices & Notes

Best Practices

  • Check the error message if encoding fails; it names exactly which character has no Morse mapping.
  • Strip or transliterate accented characters before encoding, since they have no International Morse equivalent to fall back on.
  • Round-trip the result through the decoder to confirm the word separators survived copy-and-paste intact.

Developer Notes

The character table is a plain object literal mapping uppercase letters, digits, and punctuation to their dot/dash strings, shared with the decoder via a reverse-mapped lookup table built once at module load.

Morse Code Encoder Use Cases

  • Creating puzzle or escape-room content
  • Amateur radio practice material
  • Encoding a fun or novelty message

Common Mistakes

  • Expecting lowercase and uppercase to encode differently; Morse code is case-insensitive.
  • Treating the spacing as decorative; the single spaces and the slashes are the only thing distinguishing letters from words.

Tips

  • Use Convert Morse Code to a String to decode the result back to text.
  • The output uses ASCII hyphens and full stops rather than typographic dashes, so it survives being pasted into editors that auto-format punctuation.

References

Frequently Asked Questions