Morse code decoder

A JSON file to help decode morse-code

1 minutes


It's not often people need to decode text into morse code (and visa-versa), but if I had something like this when I needed to, it would have saved me hours of time!

Usage

In order to make it accessible for as many people in as many different languages as possible, I converted our code from python to JSON. Just find a JSON library for your desired language, and it'll work perfectly!

The source of the library is on GitHub as a gist. I recommend downloading the file to use yourself, however for testing you can use GitHub's raw file as a hotlink.

morse_code_decoder.json    View Raw
 1{
 2  " ":" ",
 3  "'":".----.",
 4  "(":"-.--.-",
 5  ")":"-.--.-",
 6  ",":"--..--",
 7  "-":"-....-",
 8  ".":".-.-.-",
 9  "/":"-..-.",
10  "0":"-----",
11  "1":".----",
12  "2":"..---",
13  "3":"...--",
14  "4":"....-",
15  "5":".....",
16  "6":"-....",
17  "7":"--...",
18  "8":"---..",
19  "9":"----.",
20  ":":"---...",
21  ";":"-.-.-.",
22  "?":"..--..",
23  "A":".-",
24  "B":"-...",
25  "C":"-.-.",
26  "D":"-..",
27  "E":".",
28  "F":"..-.",
29  "G":"--.",
30  "H":"....",
31  "I":"..",
32  "J":".---",
33  "K":"-.-",
34  "L":".-..",
35  "M":"--",
36  "N":"-.",
37  "O":"---",
38  "P":".--.",
39  "Q":"--.-",
40  "R":".-.",
41  "S":"...",
42  "T":"-",
43  "U":"..-",
44  "V":"...-",
45  "W":".--",
46  "X":"-..-",
47  "Y":"-.--",
48  "Z":"--..",
49  "_":"..--.-"
50}

Share this page