Morse Spectrogram Decoder
Encode, visualize, synthesize, and decode Morse code locally
About
A deterministic client-side Morse utility supporting A–Z, numbers, punctuation, ITU WPM timing, 600 Hz sine synthesis, and a simple amplitude-threshold decoder.
Examples
SOS round-trip
morseToText(textToMorse("SOS").morse)"SOS" ("... --- ..." in between)Encoding then decoding returns the original letters through the code table.
WPM timing at 20 WPM
calculateTiming("... --- ...", 20).ditSeconds0.061.2 / 20 gives a 60 ms dit; the full SOS spans about 1.62 seconds.
About this tool
Morse Spectrogram Decoder encodes text with textToMorse (alias encodeMorse): A–Z, 0–9, and punctuation map through MORSE_CODE, letters join with spaces, words with /, and unsupported characters are skipped with an Unsupported character warning.
Timing follows the ITU formula in calculateTiming(morse, wpm): ditSeconds equals 1.2 / wpm, dahs last 3 dits, intra-letter gaps 1 dit, letter gaps 3 dits, and word gaps 7 dits — every segment records kind, symbol, duration, and start offset with totalSeconds for the full message.
Audio round-trips stay in the browser: synthesizeMorse builds 8 kHz sine samples (configurable frequency, amplitude, WPM) with silence in the gaps, and decodeToneSequence re-derives morse from block energy before morseToText (alias decodeMorse) restores the text.
How to use this tool
Encode text
Pass plain text to textToMorse — read morse plus any unsupported-character warnings.
Plan timing
Call calculateTiming with the morse string and WPM to get dit length, segments, and total seconds.
Synthesize audio
Use synthesizeMorse with wpm, frequency, and sampleRate for Float32 samples plus timing metadata.
Decode back
Feed samples to decodeToneSequence (same WPM) or morse strings to morseToText for the text.
Use cases
Learning Morse timing
Visualize dit/dah/gap ratios at different WPM speeds before keying practice.
Generating practice audio
Synthesize deterministic sine tones for SOS drills and decoder tests.
Checking decoder output
Round-trip synthesized samples through the energy detector to verify settings.
Common mistakes
Mistake:Ignoring the warnings array on encode.
Fix:Characters like € have no code and are dropped — check warnings for each Unsupported character entry.
Mistake:Decoding with a different WPM than synthesis.
Fix:Dit thresholds scale with 1.2 / wpm, so pass the same WPM to synthesizeMorse and decodeToneSequence.
Frequently asked questions
What does this tool do?
It encodes text with textToMorse, times it with calculateTiming, synthesizes sine audio with synthesizeMorse, and decodes back with decodeToneSequence or morseToText.
What is the dit length at my speed?
ditSeconds is 1.2 / wpm — 0.06 s at 20 WPM — with dah 3 dits, letter gaps 3 dits, and word gaps 7 dits.
Is my message uploaded or stored?
No. Code-table lookup, timing math, synthesis, and energy detection run entirely in your browser.
Why did characters vanish, or decoding fail?
Unsupported characters are skipped with a warnings entry, and decodeToneSequence needs the same WPM used for synthesis to threshold dits correctly.
Related guides
References & standards
Related tools
Ambient Noise Generator
Blend white, pink and brown noise live in your browser — focus masking, tinnitus relief and sleep, with a built-in sleep timer.
Audio BPM Tap & Tempo Detector
Tap a beat or detect tempo from audio sample onsets with robust local signal analysis.
Audio dBFS, dBu, dBV & Voltage Converter
Convert digital and analog audio levels with professional and consumer references
Binaural Noise Synthesizer
Create binaural beats with white, pink, or brown noise
Metronome & Instrument Tuner
Keep visual tempo and tune instruments around an adjustable A4 reference.
Text to Speech (TTS)
Read any text aloud with your browser's built-in voices — control voice, rate, pitch and volume, all processed on your device.