A Morse code encoder and decoder that runs in your browser, styled as a rack-mount studio unit. It's a companion to Dit·Dah Pedal, the Morse trainer.
Live: https://nickperry68.github.io/ditdah-codec/
Type a message to see it as dots and dashes on the Morse tree. You can hear it, and save it as a small WAV file (8 kHz, 16-bit, about 1 MB a minute). The message text goes into the file's label, so when the codec decodes its own file it can check the result.
If radio shorthand would say it shorter, it's offered underneath. For example, "Thanks for the call, please send again" becomes TNX FER CALL PSE AGN. Type <SK>, <BT>, <AR>, <KN> or <SOS> for prosigns.
Open an audio or video file, drop one on the decoder, or use the microphone. Each decoded word shows two lines: what was sent (CQ DE M0DAH), and what it means underneath (calling any station · this is). Q-codes, abbreviations, prosigns and callsigns are expanded.
- Waterfall: time runs left to right and pitch bottom to top. Morse shows as a dotted bright line. The decoder finds the line by itself, judging how Morse-like it is: two clear levels, switching several times a second. If it picks the wrong one, click the line you want, and AUTO lets it choose again.
- Speed and spacing adapt to the sender, including hand-sent timing and Farnsworth spacing.
- NOISE shows the parts it judged not to be Morse. They're hidden by default, which keeps the output clean on film soundtracks.
- Files up to 300 MB decode all at once, with timestamps. Click a word to jump the player to it. Bigger files decode as they play.
- Microphone works on the GitHub page. Browsers block it inside some embedded previews.
Point it at a scene with a radio operator and see whether the Morse is real. Expect a lot of it to be gibberish, because sound editors used library effects. Some productions used real operators, though. Clicking telegraph sounders (railway and Western scenes) are a different code and a different sound, and the codec doesn't attempt them.
It's one self-contained HTML file using the Web Audio API, with no libraries. The decoder works in five stages:
- A quadrature mixer with a three-pole low-pass filter isolates the tone, and fine-tunes itself from the phase drift.
- An adaptive threshold detects when the key is up or down.
- Local clustering separates dits from dahs and letter gaps from word gaps.
- Each word gets a timing-fit score, so noise can be hidden.
- Tone detection uses an FFT waterfall, scoring each frequency by two-level contrast and switching rate.
MIT © 2026 Nick Perry
