Morse Code Converter

Morse Code Converter API

Utilities

Convert text to Morse code and vice versa instantly. Perfect for students, hobbyists, and history enthusiasts learning about communication systems.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

120 requests per minute

Endpoints

1 endpoint available

Overview

Converts text to Morse code and Morse code back to text.

Supported characters

  • Letters A-Z, case-insensitive
  • Numbers 0-9
  • Punctuation: . , ? ' ! / ( ) & : ; = + - _ " $ @
  • Any other character is kept as it is in the output.

Format

  • Dot (.) is a short signal and dash (-) is a long signal.
  • Letters are separated by a single space.
  • Words are separated by " / " (space, slash, space).
  • Example: SOS becomes ... --- ....
  • Decoded text always comes back in capitals, and unknown codes are kept as they are.

Limits

Input up to 100,000 characters.

Endpoints

POST
https://opentools.ca/api/v1/tools/morse-code-converter
Convert between text and Morse code

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
input
string
Required
The text or Morse code to convert, 1 to 100,000 characters.
direction
string
Enum: textToMorse, morseToText
Required
Conversion direction.

Response Example

{
  "success": true,
  "input": "SOS HELP",
  "direction": "textToMorse",
  "output": "... --- ... / .... . .-.. .--."
}

Error Codes

400
Bad Request - Missing input, input too long, or invalid direction
401
Unauthorized - Invalid or missing API key
403
Forbidden - API key is inactive or expired, or the request IP is not allowed for this key
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

Code Examples

# Text to Morse
curl -X POST https://opentools.ca/api/v1/tools/morse-code-converter   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{
    "input": "HELLO WORLD",
    "direction": "textToMorse"
  }'

# Morse to text
curl -X POST https://opentools.ca/api/v1/tools/morse-code-converter   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{
    "input": ".... . .-.. .-.. --- / .-- --- .-. .-.. -..",
    "direction": "morseToText"
  }'

Ready to get started?

Create an API key to start using the Morse Code Converter API.

Rather use it in your browser? Open the Morse Code Converter