← Codes you can try

Morse Code and Binary

Two ways to write the same message with two kinds of signal.

This page has two working tools: one for Morse code, with sound and a light, and one for binary. Everything runs in your browser. Nothing you type is sent or kept.

I The idea

One message, different codes

A message can be written down in many ways. The words stay the same. The way they are written changes.

Morse code turns each letter into a pattern of short and long signals. A short signal is a dot. A long one is a dash. You can send them as beeps, as flashes of light, or by tapping.

Binary turns each letter into a number, and then writes the number with just two digits, 1 and 0. This is how computers store text. Each 1 or 0 is called a bit.

A code is not the same as encryption. Encryption hides a message from people who do not have the key. A code hides nothing. Anyone with the chart can read it. Morse and binary are just different ways of writing.

LetterMorseBinaryH01001000E01000101L01001100L01001100O01001111
The word HELLO, letter by letter: as plain letters, in Morse code and in binary. Drawn in code from the same chart the tools below use.

II Morse code

Write it in Morse code

Follow the steps from 1 to 3. The page opens with a word already typed, so you can see a result. The result changes as you type.

Write a message in Morse code

Letters and the digits 0 to 9 work. Other characters, such as punctuation, are left out. Spaces start a new word.

2. See it in dots and dashes. Each letter has its own pattern. A dot is a short signal and a dash is a long one.

    All together: a space between letters and a slash between words

    3. Play it. Tap Play to hear it, and watch the light blink in time. The light helps anyone who cannot hear the beeps.

    Not playing.

    Sound starts when you tap Play, and not before. The light does not flash more than three times a second, which is the limit the web’s accessibility guidelines set for flashing. At the top speed, 6 words a minute, it flashes at most two and a half times a second. If your device asks for less motion, the light stays steady while the message plays instead of blinking.

    Read Morse code

    Going the other way is just as easy with the chart. Type dots and dashes. Leave a space between letters and put a slash between words.

    Use the full stop (.) for a dot and the hyphen (-) for a dash. A dot, a middle dot or a bullet all work for a dot.

      The message

      The chart

      This is the whole chart for the letters and the digits 0 to 9. International Morse code has more signs for punctuation, which this page leaves out.

      Letters

      • A
      • B
      • C
      • D
      • E
      • F
      • G
      • H
      • I
      • J
      • K
      • L
      • M
      • N
      • O
      • P
      • Q
      • R
      • S
      • T
      • U
      • V
      • W
      • X
      • Y
      • Z

      Digits

      • 0
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9

      III Binary

      Write it in binary

      Computers store text as numbers. Each letter, digit and symbol has a number, and the computer keeps that number in binary. The page opens with a word already typed.

      Write a message in binary

      Any letters work. Capital and small letters have different numbers, so Hello and HELLO give different binary.

      2. See each letter as a number, then as binary. Each letter below shows its number and its 8 binary digits. Eight bits make one byte.

        All together

        3. What about other letters? This tool writes your message in UTF-8, the way text is stored on the web. English letters, digits and common punctuation take one byte. Letters with accents, other alphabets and emoji take two, three or four bytes, and this tool shows every byte. A letter’s number comes ahead of its code point in brackets: é is 233 (U+00E9). Some emoji are built from several characters joined together, such as a thumbs up with a skin tone (2 characters, 8 bytes) or a family (5 characters, 18 bytes, with joiners you can’t see getting cards of their own). Try typing é or a character from another alphabet.

        Read binary

        Paste binary and see the text. Put the digits in groups of 8. Spaces and line breaks between the groups are fine.

        Just the digits 0 and 1 can go in a group. A whole number of groups of 8 is needed.

        The text

        Flip the bits

        A byte is eight switches. Each one is worth a number, and the numbers double as you move to the left. Switch on the ones you want, add up their numbers, and you have the number the byte stands for. The page opens on the byte for capital A.

        The bits

        The sum

        The number, and the letter it makes

        IV History

        A little history

        Samuel Morse worked on an electric telegraph in the 1830s. In 1837 Alfred Vail joined him. The dot-and-dash code grew out of their work together, and historians disagree about how much of it was Vail’s.

        On 24 May 1844 the message “What hath God wrought” was sent along the telegraph line from Washington and received in Baltimore.

        Morse’s own code was later changed. In 1848 Friedrich Gerke, a German working on the telegraph line from Hamburg to Cuxhaven, changed much of it. In 1865 the International Telegraph Convention in Paris named Morse code for international use, and International Morse code builds on Gerke’s version.

        In 1906 a radio conference in Berlin chose SOS as the call for help at sea, and the rules came into force in 1908. In Morse code, SOS is three dots, three dashes, three dots. To read it in the box above, type it with a space between the letters: ... --- ... (written closed up, as ...---..., it is not a code the chart knows). In 1912 the radio operators on the Titanic sent both CQD and SOS.

        Binary is older than computers. By 1679 the German thinker Gottfried Wilhelm Leibniz had worked out how to count with just 0 and 1. In 1701 a French Jesuit, Joachim Bouvet, sent him a diagram of the I Ching, an ancient Chinese book. Leibniz noted that its hexagrams matched the binary numbers from 000000 to 111111.

        To store text, computers needed a table of numbers for letters. ASCII, published in 1963 by the American Standards Association, is a table of 128 numbered codes, from 0 to 127, for letters, digits, symbols and control signals. The 1963 table had no small letters; a revision in 1967 added them. A capital A is 65. ASCII does not include accented letters or other alphabets.

        Unicode aims to fix that by giving the characters of the world’s writing systems their own numbers. The Unicode Consortium was set up in January 1991, and Unicode 1.0 appeared that October. In September 1992 Ken Thompson and Rob Pike designed UTF-8, a way of writing Unicode numbers as bytes. Plain ASCII text is the same in UTF-8 as it was in ASCII. UTF-8 is now the most common way to write the text of web pages.

        Where sources differ, this page says less. They disagree about who devised the dot-and-dash code. Lemelson-MIT gives 11 May 1844 for an earlier message between Washington and Baltimore, and says “What hath God wrought” came soon after. The Library of Congress gives 24 May 1844 for “What hath God wrought”, which is the date used here. This page does not say which message came earliest. One page gives 1689 for Leibniz’s binary system and two give 1679, so this page says he had worked it out by 1679. Sources also give different accounts of who started the work that became UTF-8, so this page says just that Thompson and Pike designed it. It also leaves out the day of the Paris convention and the day of the Berlin radio rules, because the sources did not agree or just one gave it. SOS doesn’t stand for anything: the phrase “Save Our Souls” was attached to it later.

        1. By 1679Leibniz and the 0s and 1sThe German thinker Gottfried Wilhelm Leibniz has worked out how to count with just two digits.
        2. 1701Hexagrams from the I ChingA French Jesuit, Joachim Bouvet, sends Leibniz a diagram of the hexagrams of the I Ching, an ancient Chinese book. Leibniz notes that they match the binary numbers.
        3. 1837Morse and VailAlfred Vail joins Samuel Morse to build a working electric telegraph. The dot-and-dash code grows out of their work together.
        4. 24 May 1844What hath God wroughtThe message “What hath God wrought” is sent along the telegraph line from Washington and received in Baltimore.
        5. 1848Gerke changes the codeFriedrich Gerke, a German working on the telegraph line from Hamburg to Cuxhaven, changes much of Morse’s code.
        6. 1865International MorseIn Paris, the International Telegraph Convention names Morse code for international use. International Morse builds on Gerke’s version.
        7. 1906–1908SOSA radio conference in Berlin in 1906 chooses SOS as the call for help at sea. The rules come into force in 1908.
        8. 1912The TitanicThe Titanic’s radio operators send both CQD and SOS as the ship sinks.
        9. 1963ASCIIThe American Standards Association publishes ASCII, which is a table of 128 numbered codes, from 0 to 127, for letters, digits, symbols and control signals, so that computers can store text.
        10. 1991UnicodeThe Unicode Consortium is set up in January, and Unicode 1.0 is published in October. It aims to give the characters of the world’s writing systems their own numbers.
        11. September 1992UTF-8Ken Thompson and Rob Pike design UTF-8, a way to write those numbers as bytes. Plain ASCII text stays exactly as it was.
        The same story as a timeline, drawn in code.

        V Keep going

        Keep going

        Codes that hide a message need a secret. Try the Caesar cipher or the Vigenère cipher, or see more pages in Codes you can try.

        VI Sources

        Sources

        Every name and date above was checked against at least two pages, opened on 20 November 2026. Nothing from them is copied: the history is written in our own words.

        Morse, Vail and the telegraph: Linda Hall Library, “Alfred Vail” (opens in a new tab); Lemelson-MIT, “Samuel Morse” (opens in a new tab); and Wikipedia, “Alfred Vail” (opens in a new tab), “Morse code” (opens in a new tab), and the Library of Congress, “The telegraph message of 24 May 1844” (opens in a new tab).

        International Morse code: Wikipedia, “Friedrich Clemens Gerke” (opens in a new tab), and the International Telecommunication Union, “The 1865 International Telegraph Conference” (opens in a new tab).

        SOS and the Titanic: Wikipedia, “SOS” (opens in a new tab), and PBS American Experience, “Wireless Signals” (opens in a new tab).

        Binary: Wikipedia, “Gottfried Wilhelm Leibniz” (opens in a new tab), “Joachim Bouvet” (opens in a new tab) and “Binary code” (opens in a new tab), and the University of St Andrews, “Gottfried Leibniz” (MacTutor) (opens in a new tab).

        ASCII, Unicode and UTF-8: IEEE, “American Standard Code for Information Interchange (ASCII), 1963” (opens in a new tab); the Unicode Consortium, “History of Unicode” (opens in a new tab) and “Unicode 1.0” (opens in a new tab); the IETF, RFC 3629, “UTF-8, a transformation format of ISO 10646” (opens in a new tab); Rob Pike’s account, “UTF-8 history” (kept by Markus Kuhn) (opens in a new tab).

        The Morse chart is International Morse code for the letters and digits, as in ITU-R Recommendation M.1677-1 (“International Morse code” (opens in a new tab)). No photographs are used on this page: every picture is drawn in code.