Validation Utilities

Validate Mac

Validates MAC address format across common notations including colon-separated (AA:BB:CC:DD:EE:FF), hyphen-separated, and dot-separated variants. Use via MCP in Cursor or Windsurf for network tooling, or call GET /v1/validate/mac directly. Returns boolean validation with format details — essential for network configuration scripts and device management workflows.

API Endpoint

GET /v1/validate/mac

Code Examples

curl "https://tinyfn.io/v1/validate/mac" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/validate/mac', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/validate/mac',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's validation tools:

{
  "mcpServers": {
    "tinyfn-validation": {
      "url": "https://tinyfn.io/mcp/validation",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What MAC address formats does the validator accept?

Accepts colon-separated (AA:BB:CC:DD:EE:FF), hyphen-separated (AA-BB-CC-DD-EE-FF), dot-separated (AABB.CCDD.EEFF), and plain hex formats. Case-insensitive for hex digits.

How do I validate MAC addresses in my MCP-enabled editor?

Call the validate_mac tool from Cursor, Windsurf, or other MCP clients. Pass the MAC string as parameter — the tool returns validation status and detected format type.

Does it validate both EUI-48 and EUI-64 addresses?

Validates standard 48-bit MAC addresses (6 octets). For 64-bit EUI addresses, use a dedicated EUI-64 validator instead.

What happens with broadcast or multicast MAC addresses?

Validates format regardless of address type — broadcast (FF:FF:FF:FF:FF:FF) and multicast addresses pass if properly formatted.

Can I validate MAC addresses from network interface output?

Yes, handles common formats from ifconfig, ip link, and network device configurations. Strips whitespace and validates the extracted MAC string.

Try Validate Mac Now

Get your free API key and start using Validate Mac in seconds.

Get Free API Key