The Morse Code Encoder/Decoder is a one-box tool with two modes. The page holds a toggle for encode and decode, a text area, and below it, once there is anything to show, an output line with a play button and a copy button. There is no run button and nothing to configure: type or paste, and the result appears on the same keystroke. The table behind it covers 54 single symbols, the 26 letters, the 10 digits, the space and 17 punctuation marks, and every conversion runs in the browser on the device, with nothing sent anywhere.
Two modes, one input box
Encode is the default mode and turns text into dots and dashes; decode does the reverse and turns a string of dots and dashes back into text. The toggle changes only the label and the placeholder of the single text area, and the output updates as you type. The output area exists only when there is something to show: an empty or whitespace-only input leaves the page with just the toggle and the box. Two buttons sit on the output line, play for the audio and copy for the clipboard, and a reference grid with the full table sits below the box.
The 54-symbol table
The table covers the 26 letters from A to Z, the 10 digits from 0 to 9, the space, and 17 punctuation marks: period, comma, question mark, exclamation mark, slash, open and close parenthesis, ampersand, colon, semicolon, equals, plus, hyphen, underscore, double quote, dollar sign and at sign. Each symbol has its own fixed pattern of dots and dashes: E is a single dot, T a single dash, S three dots and O three dashes. The space is not a pattern at all but a slash, the word separator. The grid under the box lists all 54 symbols with their patterns, the quickest way to look up a letter while typing.
How encode treats whitespace and unknown characters
Encode first folds the input to uppercase, then walks it one character at a time. Any whitespace character, a space, a newline or a tab, becomes a slash, so the line breaks of a pasted paragraph act as word breaks and the whole text encodes on one line. Every other character is looked up in the table, and a character that is not in the table, say a hash or a letter of another alphabet, is kept as itself in the middle of the code, with no error and nothing dropped. The result is joined with single spaces between symbols, so no matter how the input was wrapped, the output is always one space-separated line.
How decode reassembles text
Decode splits the input on any run of whitespace, one or more spaces, tabs or newlines, and looks each token up in the reverse table. Whitespace is only a letter separator: three dots, three dashes and three dots decodes to SOS with no spaces in between, even when the input had several, because a space in Morse input never becomes a space in the text. The one character that does produce a space is the slash, the same mark that encode writes between words. A token that is not a known pattern decodes to a question mark instead of being dropped, so a mistyped letter stays visible as a ? in the middle of the sentence, which makes the error easy to find.
Edge cases: the dot and the quote share one code
In the international table the period and the double quote share the same pattern, dot-dash-dot-dash-dot, and a lookup table can map one pattern to only one character. This tool resolves the clash toward the period, the more frequent of the two in ordinary text, so prose round-trips. The practical consequence is that the quote does not: encode the three characters (, the double quote and ), and on decode the quote comes back as a period, and the pattern never decodes to a double quote. Case is the second thing a round trip loses. Encode uppercases its input, so Hi, I am Claude 2026 comes back as HI, I AM CLAUDE 2026, correct letters, no lowercase.
Audio playback
The play button renders the output as a 600 Hz tone at the classic dot timings. A dot sounds for 100 milliseconds, a dash for 300, and the silence between the symbols of a letter is the gap already present in the text, one join space counted as 300 milliseconds. The slash sounds for nothing but reserves 700 milliseconds, seven dots, the standard word gap; because encode writes a space on each side of the slash, the full silence between two words works out to about 1.3 seconds. In decode mode the output is plain text, so playback is mostly the gaps: each letter and punctuation mark reserves 300 milliseconds of silence, and any dot or dash present in the text still sounds normally.
What the tool keeps, and where to go next
Nothing is kept: no network request is made, nothing is stored, and reloading the page clears the box and the output. For the rest of the encoding workflow, the Text/Binary Converter writes the same text as bits of 0 and 1, the Base64 Encoder/Decoder maps text to the 64-character alphabet used by e-mail and web payloads, and the URL Encoder/Decoder shows what percent-encoding does to the same string. For a classic cipher on the other side of history, see the Caesar cipher guide.