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

100 requests per minute

Endpoints

1 endpoint available

Overview

The Morse Code Converter API provides bidirectional conversion between text and Morse code.

Supported Characters

  • Letters: A-Z (case insensitive)
  • Numbers: 0-9
  • Punctuation: . , ? ' ! / ( ) & : ; = + - _ " $ @

Format

  • Dot (.) = short signal
  • Dash (-) = long signal
  • Space = separates letters
  • Forward slash (/) = separates words
  • Example: "SOS" → "... --- ..."

Endpoints

POST
/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
direction
string
Required
Conversion direction: "textToMorse" or "morseToText"

Response Example

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

Error Codes

400
Bad Request - Missing input or invalid direction
401
Unauthorized - Invalid or missing API key
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

Code Examples

# Text to Morse
curl -X POST https://api.opentools.ca/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://api.opentools.ca/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.