Morse Code Generator
Convert text or TXT files into Morse code, then tune WPM, Farnsworth spacing, tone, silence, playback, WAV export, timeline charts, and JSON.Encoded cadence
{{ morse_display }}
| Metric | Value | Copy |
|---|---|---|
| Unit (ms) | {{ Math.round(unit_ms) }} | |
| Total units | {{ total_units }} | |
| Duration (s) | {{ duration_seconds.toFixed(2) }} | |
| Characters | {{ char_count }} | |
| Words | {{ word_count }} | |
| Letters encoded | {{ letter_count }} | |
| Unknown chars | {{ unknown_count }} | |
| Dots | {{ dots }} | |
| Dashes | {{ dashes }} | |
| Input text | {{ input_text }} | |
| Morse | {{ morse_display }} |
Morse playback:
{{ playing ? 'Playing' : 'Ready' }}Introduction:
Morse code represents text as timed patterns of short and long signals. The dots and dashes matter, but the silence between them matters just as much. A message that has the right characters but the wrong spacing can be harder to copy than a slower message with clear rhythm.
International Morse code uses a simple timing idea: a dot is the basic unit, a dash is three units, letters are separated by a longer silence, and words are separated by a still longer silence. Words-per-minute speed controls the unit length, so higher speed shortens every tone and standard gap.
A generator is useful when you need to prepare a message, create practice audio, inspect timing, or verify that text maps to the expected code. It is not a receiver and it does not judge whether a message follows operating procedure. It turns supplied text into encoded Morse, timing metrics, a tone timeline, playback, and downloadable artifacts.
Morse is best learned by sound rather than by counting marks one by one. A visual string is helpful for checking the mapping, but the audio and timeline are what reveal whether the rhythm is comfortable enough to copy.
How to Use This Tool:
Check the encoded string first, then inspect timing and audio before exporting.
- Paste a message into Text to encode, drop text onto the field, or use Browse TXT. The page uppercases supported letters before Morse lookup.
- Set Speed in WPM. The summary should update Unit (ms), Duration (s), and the dot/dash counts after text is present.
- Open Encoded Morse and scan the final string. If content is missing, check Unknown chars in Encoding Metrics before trusting playback.
- Use the Speed slider or exact WPM box for character timing. Open Advanced when spacing or audio needs adjustment, then tune Farnsworth speed, tone frequency, volume, lead silence, and tail silence with bounded controls.
- Set Unknown character policy. Skip removes unsupported symbols; Replace inserts the selected placeholder when that placeholder has a Morse mapping.
- Use Playback Timeline to inspect tone versus silence, then use Play or the Audio Player controls to hear the current tone plan.
- Export only after the metrics make sense. Use the Morse text download for the encoded string, WAV for audio practice, chart exports for timing evidence, or JSON for a compact structured record.
Interpreting Results:
The Morse output, timing metrics, and playback chart answer different questions. The encoded string shows the symbol mapping. The metrics show whether the entered text survived the mapping and how long the message will take. The timeline shows when the tone is on or silent.
| Result Field | Meaning | Verification Cue |
|---|---|---|
| Unit (ms) | Dot length derived from the main WPM speed. | If WPM changes and this value does not, recheck the speed entry. |
| Duration (s) | Total planned tone and silence time, including lead and tail silence. | Compare before and after Farnsworth or silence changes when pacing matters. |
| Letters encoded | Mapped non-space characters, including supported digits and punctuation. | Compare with Characters and Unknown chars when the output seems short. |
| Unknown chars | Characters that did not have a built-in Morse mapping. | Clean smart quotes, accents, emoji, percent signs, or other unsupported marks before exporting. |
| Playback Timeline | A step trace of tone level over elapsed seconds. | Look for expected longer gaps between words and any unwanted leading or trailing silence. |
The common false confidence is trusting audio when unknown characters were skipped. A clean-sounding WAV can still be missing content. Check Unknown chars and the final Morse field before using the output for practice or sharing.
Technical Details:
International Morse code is a variable-length code. Common letters tend to have shorter patterns, while less common letters, numbers, and punctuation can require more elements. The timing system uses on/off keying rather than fixed-width characters, so total message duration depends on both the text and the selected speed.
The base dot unit follows the PARIS convention, where 20 WPM means the standard word fits twenty times into one minute. The page uses Speed for dot, dash, and intra-character spacing. Farnsworth speed, when set below the main speed, lengthens only the inter-character and inter-word gaps.
Formula Core:
The main equation computes the dot unit in seconds from the selected WPM.
Here, u is the dot unit in seconds, WPM is the main speed, and F is the optional Farnsworth speed. At 20 WPM, u = 1.2 / 20 = 0.06 seconds, so a dot is 60 ms and a dash is 180 ms. With Farnsworth set to 10 WPM, the dot and dash stay at 20 WPM timing, while the letter and word gaps use a 120 ms spacing unit.
Transformation Core:
Text is trimmed into whitespace-separated words, each supported character is mapped to dots and dashes, and unsupported characters are counted before the selected unknown-character policy is applied. A slash in the visible output separates encoded words.
| Character | Morse | Character | Morse | Character | Morse |
|---|---|---|---|---|---|
| A | .- | E | . | S | ... |
| B | -... | H | .... | O | --- |
| C | -.-. | L | .-.. | W | .-- |
| 1 | .---- | 5 | ..... | 0 | ----- |
| ? | ..--.. | / | -..-. | @ | .--.-. |
The generated segment list drives both the metrics and the audio. Tone segments become sine-wave audio at the selected frequency and volume. Silence segments create the gaps, lead silence, and tail silence. The WAV export uses mono 16-bit PCM at 44.1 kHz with short fades at tone edges so starts and stops sound cleaner.
Different dedicated trainers can implement slowed spacing in slightly different ways. This page uses the lower secondary WPM directly for the longer gaps, so total duration may not match every trainer even when the headline speed values look similar.
Privacy Notes:
The visible workflow reads text and TXT files in the browser after the page loads. There is no server submission step for the message. The main privacy risk is the content you copy, download, export, play aloud, or include in a shared page address.
- Do not paste private call signs, credentials, or sensitive message text unless you are comfortable with it appearing in exported files.
- Selected TXT files are used as text input; review the resulting Morse and Unknown chars fields before saving artifacts.
- A shared browser address can expose changed form values, so avoid sharing it after entering private text.
Worked Examples:
Entering HELLO WORLD at 20 WPM should produce .... . .-.. .-.. --- / .-- --- .-. .-.. -... Unit (ms) should be about 60, and Unknown chars should be 0. Use this as a quick sanity check before changing advanced timing.
For receive practice, keep Speed at 20 WPM and set Farnsworth speed to 10 WPM. The dots and dashes keep the same shape, but Duration (s) increases because letter and word gaps are longer. The timeline should show wider silent spans between characters and words.
If the text contains CAFÉ with Unknown character policy set to Skip, the accented letter is counted in Unknown chars and does not appear in the Morse output. Replacing the source with CAFE or choosing a mapped placeholder makes the missing character explicit.
Adding 0.25 seconds of lead silence and 0.50 seconds of tail silence does not change the visible Morse string. It changes Duration (s), the timeline, playback, and WAV export so the audio has a cleaner start and finish.
FAQ:
Why does the output use slashes?
A slash separates encoded words in the visible Morse string. Letter spacing is shown with spaces between character codes, while the actual timing uses silence durations.
What does Farnsworth speed change?
It lengthens the gaps between letters and words only when it is greater than 0 and lower than the main WPM. Dot and dash timing still comes from Speed.
Why are some characters missing?
Unsupported characters are counted in Unknown chars. Use Replace with a mapped placeholder, or clean the source text before exporting.
Does frequency affect the Morse timing?
No. Tone frequency changes playback and WAV pitch only. The timing metrics stay the same unless speed, Farnsworth spacing, or silence settings change.
Can this decode incoming Morse audio?
No. This page generates Morse from supplied text. Use a decoder when you need to interpret incoming audio or pasted code.
Glossary:
- Dot
- The shortest Morse tone, one timing unit long.
- Dash
- A longer Morse tone, three timing units long.
- WPM
- Words per minute, the speed value used to derive the dot unit.
- Farnsworth speed
- A lower spacing speed that stretches letter and word gaps while preserving character timing.
- Unknown chars
- The count of input characters that did not have a built-in Morse mapping.
- Playback Timeline
- The chart that shows tone level over elapsed seconds.
References:
- M.1677: International Morse code, International Telecommunication Union, October 2009.
- Recommendation ITU-R M.1677-1, International Telecommunication Union, 2009.
- A Standard for Morse Timing Using the PARIS Word, ARRL.
- Morse Code Farnsworth Timing, Morse Code World.