Encode Summary
{{ duration_readable }}
Total duration
WPM {{ wpm }} Farnsworth {{ farnsworth_wpm }} {{ letter_count }} letters {{ word_count }} words {{ dots }} · {{ dashes }} Unknown {{ unknown_count }}
{{ morse_display }}
Text:
{{ volume_percent }}%
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 }}

                    
:

Introduction:

Morse code is a timing based alphabet that represents letters and numbers with dots and dashes. It helps convey short messages by sound or light when conditions are noisy or bandwidth is limited.

Text to Morse code audio makes spacing easy to hear and compare, so practice can focus on rhythm and clarity. You set a speed in words per minute and decide whether to stretch the gaps for comfort.

Type or paste a line of text and you get an encoded sequence with counts and a clear run time. You can listen to a steady tone version and export a WAV file for drills or sharing with classmates.

For consistent results keep one language at a time, avoid unusual symbols when learning, and repeat runs at the same speed so your ear learns the pattern.

Technical Details:

Morse code timing uses a single base unit that sets how long a dot lasts. From that unit the dash, the gap between symbols, the gap between letters, and the gap between words are derived. A common convention ties the unit to words per minute so the perceived message speed is predictable.

The calculator derives the dot unit from words per minute, then builds a timeline of tone and silence segments while counting dots, dashes, letters, words, and unknown characters. Farnsworth spacing optionally increases only the gaps between letters and words for easier copy while keeping the element speed unchanged.

Results include the dot unit in milliseconds, the total number of units, a duration in seconds, and the rendered Morse string using your chosen letter and word separators. Interpretation is direct. A shorter unit means faster code, and a higher Farnsworth value produces longer silence between letters and words.

Comparisons are meaningful when you keep the same words per minute, the same Farnsworth setting, and similar tone frequency and volume. Mixed punctuation and unsupported symbols can reduce letter counts and slightly change totals when replacements are enabled.

u = 1.2WPM seconds per dot uF = { 1.2F if 0<F<WPM u otherwise } Lgap = 3·uF letter gap Wgap = 7·uF word gap T = N·u total duration
Symbols and units
Symbol Meaning Unit/Datatype Source
uDot durationsDerived
ufFarnsworth unit for gapssDerived
LgLetter gapsDerived
WgWord gapsDerived
WPMWords per minute (PARIS)number ≥ 1Input
FFarnsworth WPMnumber ≥ 0Input
TTotal durationsDerived
NTotal time unitscountDerived
Worked example. For “SOS” at 20 WPM and Farnsworth 0, the unit is u = 1.2/20 = 0.06 s. The sequence “… --- …” contains 28 units, so T = 28 × 0.06 = 1.68 s. Letter gaps use 3u and word gaps use 7u. Near these edges, small changes in WPM noticeably change T.
  1. Normalize line breaks and split text into words by whitespace.
  2. Map each character to dots and dashes using the built‑in table.
  3. Count dots and dashes and accumulate tone segments for each symbol.
  4. Add symbol gaps of u, then extend to 3u between letters and 7u between words.
  5. Insert optional lead and tail silence before and after the sequence.
  6. Render a step timeline, synthesize a sine tone, and export a WAV file.
I/O formats
Input Accepted Families Output Encoding/Precision Rounding
Text Typed or pasted; dropped plain‑text file Morse string “.” and “–” with custom separators Letter and word gaps per uf
Numbers WPM, Farnsworth, frequency, volume, silence Metrics CSV Unit ms, counts, totals Unit ms rounded; duration to 2 decimals
Policy Skip or replace unknown characters Audio WAV PCM 16‑bit, 44.1 kHz, mono Exact synthesis; envelope smoothing
Validation and bounds
Field Type Min Max Step/Pattern Placeholder
TextTextareaPaste text or drop a file…
WPMNumber11
Farnsworth WPMNumber01
Frequency (Hz)Number1001
Volume (%)Number01001
Lead silence (s)Number00.05
Tail silence (s)Number00.05
Unknown policySelectskip / replace
Placeholder charTextmaxlength=1
Letter separatorTextstring
Word separatorTextstring
Constants and coefficients
Constant Value Unit Source Notes
Dash length3uDerivedPer Morse definition
Symbol gap1uDerivedBetween dot/dash within a letter
Envelope ramp0.003sCodeClick‑reduction on tone edges
Sample rate44100HzCodeFixed for WAV export
Bit depth16bitsCodePCM, mono
Frequency clamp≥ 100HzCodeProtects against inaudible tones
Amplitude headroom0.9×CodePrevents digital clipping

Units, precision, and rounding. The unit is shown in milliseconds rounded to the nearest whole number. Duration is displayed with two decimals. Counts are integers. JSON summaries include the first 24 timeline points for a quick glance; audio synthesis uses the full timeline.

Networking and storage. Processing is client‑only. Dropped files are read locally and never transmitted. Audio playback and WAV creation occur entirely on the device.

Performance. Encoding runs in linear time with the number of characters. Audio rendering scales with total samples at 44.1 kHz and is practical for typical practice passages.

Files are processed locally; nothing is uploaded.

Assumptions & limitations

  • Built‑in mapping covers A–Z, 0–9, and common punctuation only.
  • Whitespace collapses so multiple spaces become single word breaks.
  • Unknown characters can be skipped or replaced by a single placeholder.
  • Heads‑up Farnsworth works only when it is less than WPM.
  • Final symbol still includes one unit of trailing silence.
  • Lead and tail silence add to total duration but not unit counts.
  • Very high WPM shortens units and may challenge playback devices.
  • Exported audio is mono and fixed at 44.1 kHz.

Edge cases & error sources

  • Accented letters and non‑Latin scripts are not mapped.
  • Curly quotes and long dashes are treated as unknowns.
  • Trailing and leading spaces are ignored after trimming.
  • Zero volume yields a silent file by design.
  • Farnsworth equal to or above WPM has no effect.
  • Placeholder without a mapping produces skips under replace mode.
  • Extremely long texts create long render times proportionally.
  • Very low frequencies can be hard to hear on small speakers.
  • Duration display rounding may hide sub‑10 ms changes.
  • Copying JSON shows only a 24‑point preview of the timeline.

How‑to · Step‑by‑Step Guide

Morse code timing and audio generation follow a simple input and review loop for repeatable practice.

  1. Paste your text and confirm characters appear as expected.
  2. Set WPM for element speed.
  3. Optionally set Farnsworth WPM to stretch gaps.
  4. Choose tone frequency and volume that are comfortable.
  5. Preview metrics, then listen and adjust if needed.
  6. Export a WAV file for later drills.
Example. “CQ TEST” at 18 WPM with Farnsworth 12 yields longer inter‑letter gaps without changing dot and dash length.
  • Pro tip: keep separators simple when pasting Morse into other tools.

FAQ

Is my data stored?

No. Text and audio are processed on your device. Dropped files are read locally and are not transmitted or saved to a server.

How accurate is the timing?

Dot length is 1.2 divided by WPM. Duration is computed from exact segments, shown to two decimals, and smoothed with a short envelope to reduce clicks.

Which characters are supported?

A–Z, 0–9, and punctuation . , ? ’ ! / ( ) & : ; = + − _ “ $ @ are mapped. Unmapped characters can be skipped or replaced by a single placeholder.

Can I use Farnsworth spacing?

Yes. Set a Farnsworth WPM lower than the element WPM to lengthen letter and word gaps without changing dot and dash speed.

What audio format is exported?

Mono WAV, 16‑bit PCM at 44.1 kHz, with a gentle 3 ms fade on tone edges to avoid clicks.

Why does Farnsworth sometimes do nothing?

If Farnsworth equals or exceeds WPM, gap stretching is disabled by design. Choose a lower Farnsworth value to enable it.

How do I encode punctuation like @ or $?

@ maps to .‑‑.‑. and $ maps to …‑..‑ in the built‑in table. Other symbols may be unmapped and treated as unknowns.

Can I run it offline?

Yes. Once loaded, encoding, playback, and export need no network connection.

Is there a cost or license?

No license text is embedded here. Usage terms depend on the host site that distributes this tool.

Troubleshooting

  • No sound. Increase volume, check device output, and verify tone frequency above 100 Hz.
  • Playback blocked. Start audio after a click to satisfy autoplay rules.
  • Audio pops. Lower volume or WPM; the envelope reduces but cannot remove all clicks.
  • Characters missing. Switch unknown policy from skip to replace.
  • Duration looks off. Remember it shows two decimals and includes lead and tail silence.
  • Export fails. Confirm storage permission and available space for the WAV file.
If the page denies audio context creation, reload the tab and begin by pressing Play after setting options.

Advanced Tips

  • Tip Train at higher element WPM with lower Farnsworth to build rhythm first.
  • Tip Try 600–800 Hz for clearer tone on small speakers.
  • Tip Add 0.2 s lead and tail silence to frame practice clips.
  • Tip Use simple separators when pasting Morse into other apps.
  • Tip Keep one language per run to avoid unmapped symbols.
  • Tip Save CSV metrics with your notes to track progress over time.

Glossary

Morse element
A dot or dash, the basic timed unit.
Unit (u)
Dot length in seconds computed from WPM.
Letter gap
Silence between letters, equal to 3u or 3uf.
Word gap
Silence between words, equal to 7u or 7uf.
Farnsworth
Spacing method that lengthens gaps while keeping element speed.
WPM
Words per minute, using the PARIS convention.
Envelope
Short fade applied to reduce clicks at tone edges.
PCM
Pulse Code Modulation for WAV audio samples.
Timeline point
A pair of time and level marking tone or silence.
Placeholder
Substitute symbol used for unknown characters.