Skip to content
GET /v1/format

Reformat a MAC address

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/macaddr-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/macaddr-api/v1/format" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/macaddr-api/v1/format", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/macaddr-api/v1/format");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/macaddr-api/v1/format",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "mac": "00:1a:2b:3c:4d:5e",
        "case": "lower",
        "format": "colon",
        "formats": {
            "dot": "001a.2b3c.4d5e",
            "bare": "001a2b3c4d5e",
            "colon": "00:1a:2b:3c:4d:5e",
            "hyphen": "00-1a-2b-3c-4d-5e"
        }
    },
    "meta": {
        "timestamp": "2026-06-03T09:25:01.273Z",
        "request_id": "450ad1db-60a1-45ad-ab3a-ae692a382d40"
    },
    "status": "ok",
    "message": "Reformat a MAC address",
    "success": true
}