Morse Code Converter
Heavstal Morse Engine translates standard text into International Morse Code and vice versa. It handles alphanumeric characters and punctuation, using standard spacing for readability.
Endpoint
Section titled “Endpoint”POST /morse
Request Parameters
Section titled “Request Parameters”| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | The input string (Text or Morse code). |
| mode | string | No | ’encode’ (Text to Morse) or ‘decode’ (Morse to Text). Default: ‘encode’. |
Example Usage (Encode)
Section titled “Example Usage (Encode)”const res = await fetch('https://heavstal.com.ng/api/v1/morse', {method: 'POST',headers: { 'Content-Type': 'application/json', 'x-api-key': 'YOUR_API_KEY'},body: JSON.stringify({ text: 'HELLO WORLD', mode: 'encode'})});Example Usage (Decode)
Section titled “Example Usage (Decode)”const res = await fetch('https://heavstal.com.ng/api/v1/morse', {method: 'POST',headers: { 'x-api-key': 'YOUR_KEY' },body: JSON.stringify({ text: '... --- ...', mode: 'decode'})});Successful Response
Section titled “Successful Response”{"status": "success","creator": "HEAVSTAL TECH","data": { "input": "HELLO WORLD", "output": ".... . .-.. .-.. --- / .-- --- .-. .-.. -..", "mode": "encode"}}