Skip to main content
morsify
Encoder

Morse Code Encoder

The technical partner of our decoder. Drop text in, get the ITU-standard encoded morse out. Useful for developers, puzzle designers, and anyone building morse into a product.

How our encoder is implemented

The core is src/lib/morse.ts in the open-source repo — a pure TypeScript function with no dependencies. The function is unit-tested against every letter of the ITU alphabet, every digit, and the full punctuation set. The same engine powers every other translator on Morsify, so output from this page is byte-identical to what you'd get anywhere else on the site.

If you're a developer: the logic is under an MIT-compatible licence on GitHub. It's about 40 lines and easy to drop into any JS/TS project without the overhead of a library.

Output format contract

Common use cases

Edge cases the encoder resolves for you

What the encoded string does not carry

An encoder gives you the symbols — dots, dashes, and separators — but morse is really a timing code, and timing lives in the playback, not the text. The string - tells you “dash,” but whether that dash lasts a fraction of a second or a full second depends on the words-per-minute you play it at. That is why the same encoded output can be sent at 5 WPM for a beginner or 30 WPM for a contest operator: the encoder fixes the pattern, and the speed is a separate dial you set when you turn the string into sound, light, or vibration.

Frequently asked questions

What does a morse code encoder do?

It converts plain text (letters, digits, punctuation) into the morse code representation — a string of dots, dashes, and word separators. This page runs the encoding live in your browser using the international ITU alphabet.

Is this encoder open source?

Yes. The underlying lib/morse.ts file is in the project's public GitHub repo (Watermelon-Coctail-Bar/morsify.co). The encoding function is a pure, dependency-free TypeScript function you can copy into any project.

How is this different from the morse code generator?

Functionally the same output — different audiences. The encoder page is framed for developers and precise technical output. The generator is framed for end users who want to hear, copy, or share their morse.

Does the encoded output include the timing or speed?

No — the encoder produces the pattern (dots, dashes, and separators) but not the timing. Morse speed (words per minute) is applied when the string is played back as sound, light, or vibration, so the same encoded output works at any WPM.

Related
Morse code decoder
Related
Full bi-directional translator
Related
Morse code generator