Morse code decoder
A JSON file to help decode morse-code
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 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
{
" ":" ",
"'":".----.",
"(":"-.--.-",
")":"-.--.-",
",":"--..--",
"-":"-....-",
".":".-.-.-",
"/":"-..-.",
"0":"-----",
"1":".----",
"2":"..---",
"3":"...--",
"4":"....-",
"5":".....",
"6":"-....",
"7":"--...",
"8":"---..",
"9":"----.",
":":"---...",
";":"-.-.-.",
"?":"..--..",
"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":"--..",
"_":"..--.-"
}
Share this page