Encode / Decode
Morse Code
Turn letters, digits, and punctuation into international Morse code, or turn dots and dashes back into text. A slash marks the gap between words.
Output
—
Output actions
Ready to copy output once your result appears.
Dots, dashes, and a slash between words
Morse Code translates with one fixed international table. Text → Morse uppercases the box, turns each letter into dots and dashes, turns each space into a slash, and joins the pieces with spaces. Morse → Text splits on those slashes for words and on spaces for letters. A character missing from the table becomes a question mark. A pattern missing from the table comes back wrapped in brackets. There is no sound and no speed control.
How to translate Morse
- 1Paste into the box labeled Input. The placeholder is a short dotted sample. The same box is used for plain text and for Morse. Typing does not rebuild Output.
- 2Press Text → Morse or Morse → Text. Output replaces whatever was there. The buttons are those two labels. A thrown failure would show a short red sentence, but ordinary unknown letters do not throw. They become ? on the way to Morse and [pattern] on the way back.
- 3Press Copy output for the current Output. There is no download. The box, the direction, and the last result are not restored on a later visit.
What it is good for
- • Turning SOS into ... --- ... and reading that line back as SOS.
- • Seeing a space become a slash, as in Hi Ho.
- • Finding letters the table does not contain, because they show up as question marks.
Example
Input
SOS
Output
... --- ...
S is three dots and O is three dashes. Morse → Text on that line returns SOS. Hi Ho encodes as .... .. / .... --- and decodes back to HI HO, uppercase.
How a letter becomes dots and dashes
The table covers A through Z, the digits 0 through 9, and a fixed punctuation list: period, comma, question mark, apostrophe, exclamation mark, slash, both parentheses, ampersand, colon, semicolon, equals, plus, hyphen, underscore, double quote, dollar, and at-sign. Text → Morse uppercases first, so sos and SOS are the same line. Each character is replaced, then the replacements are joined with a space. A space in the source is replaced with a slash before that join, so the slash sits between spaces in the result. Hi Ho is .... .. / .... ---. Two spaces in a row become two slashes: A B is .- / / -...
A character that is not in the table and is not a space becomes a question mark. A#B is .- ? -.... The hash was not dropped and it was not spelled. Morse → Text trims the box, splits words on a slash with any spaces around it, then splits each word on whitespace. Each pattern is looked up in the reverse of the same table. An empty piece is skipped. An unknown pattern is returned as that pattern inside brackets, so .... ? becomes H[?]. Known patterns come back as uppercase letters, digits, or the punctuation character.
Text to Morse and Morse to text
The two buttons do not share a mode switch that you set and then run. Each button is the run. Output stays put while you edit, including when you change a letter and have not clicked. A successful click clears the red line. Encoding an empty box yields an empty Output and no error. Decoding an empty box also yields an empty string, because the split produces nothing to translate.
There is no audio button, no timing for a dit and a dah, and no prosign that is not already one of the punctuation characters above. The card does not offer American Morse or a variant that uses different punctuation. Copy output copies Output with no added label. Download output is not offered.
Messages that fit the table
Use this page for a short message made of the letters, digits, and punctuation in the table, when you want to see the dots or recover the letters. It is a poor fit for a character that must survive exactly, such as a hash, a percent sign, or an accented letter. Those become question marks on the way out, and the original character is gone.
Spaced binary groups are the binary encoder. A four-digit \u form is the Unicode escape tool. Hex bytes are hex encode / decode. Quotes and newlines for JSON, JavaScript, or SQL are string escape. Those pages do not consult this Morse table, and this page does not emit their formats.
Question marks, slashes, and doubled spaces
The slash character is in the table as -..-. so that a slash inside a word can round-trip. A/B encodes as .- -..-. -... and decodes as A/B. The slash that separates words is the raw / character with spaces around it, which is different from the Morse pattern for the slash character. If you encode a sentence and then decode it, word spaces return as single spaces and letters return in uppercase. Punctuation in the table returns as itself.
A doubled space encodes as two word separators and decodes with an extra gap only in the sense that empty words are skipped, so A B comes back as A B. The extra space does not survive as two spaces. A question mark that was inserted for an unknown character decodes as [?], not as the character you started with. Lowercase input does not come back lowercase. There is no switch to keep the original case.
Rules and limitations
Encode uppercases, maps each table character to its dots and dashes, maps a space to /, maps anything else to ?, and joins with spaces. The table is A–Z, 0–9, and the punctuation listed above.
Decode splits words on /, then letters on whitespace. Unknown patterns become [pattern]. Case is not preserved. There is no audio, no speed, no download, and no saved state.
Common problems
If a hash or an accent became ?, it was not in the table. The page will not invent a pattern for it.
If the decoded line is uppercase, that is the table. The encoder had already uppercased before the lookup.
Frequently asked questions
What does SOS become?
Text → Morse prints ... --- ... Morse → Text on that line prints SOS.
How are words separated?
A space in the text becomes a slash. Hi Ho encodes as .... .. / .... --- and decodes as HI HO.
Can I hear the code?
No. The page prints dots, dashes, and slashes. It does not play audio or set a speed.
What happens to a character that is not in the table?
Encode writes a question mark in that position. Decode writes the unknown pattern in brackets, such as [?]. The original character is not recovered.
Is my input uploaded or saved?
This tool processes input in your browser and does not save its input or output to local storage. Copy and download are user actions. The site uses analytics for page and action metadata and may use ads and production error reporting; see the Privacy Policy for those services.
About this tool
Maintained by Toolbench. For large or deeply nested files, split the input into smaller batches and verify representative results before using them in an import or application. Report reproducible problems through Contact.
Next steps
Related tools
Continue the workflow with nearby tools for formatting, publishing, debugging, or follow-up checks.
Binary Encode / Decode
Turn text into space-separated binary groups, or turn those groups back into text.
Open Binary Encode / DecodeUnicode Escape / Unescape
Turn text into Unicode escapes, or turn those escapes back into text.
Open Unicode Escape / UnescapeHex Encode / Decode
Encode text to space-separated hex bytes, or decode those bytes back to text.
Open Hex Encode / DecodeString Escape / Unescape
Escape or unescape quotes, newlines, and backslashes for JSON, JavaScript, or SQL.
Open String Escape / UnescapeTrust
Policies, contact, and answers
Clear pages for how Toolbench works, what we collect, and how to reach us.