IP Address Utilities

Validate Ip

Validates whether a string is a properly formatted IPv4 or IPv6 address. Use via MCP in Cursor or Windsurf for instant validation, or call GET /v1/ip/validate with your IP string. Returns true/false with validation details. Perfect for form validation, network configuration checks, or preprocessing user input before network operations.

API Endpoint

GET /v1/ip/validate

Code Examples

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

response = requests.get('https://tinyfn.io/v1/ip/validate',
    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 ip address tools:

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

Learn more about MCP setup →

FAQ

How do I validate an IP address using MCP in Cursor?

Call the validate_ip tool with your IP string parameter. It returns a boolean result plus validation details for both IPv4 and IPv6 formats.

Does IP validation work for both IPv4 and IPv6 addresses?

Yes, it validates both IPv4 (like 192.168.1.1) and IPv6 (like 2001:db8::1) addresses according to their respective RFC specifications.

What happens when I validate an invalid IP address?

Returns false with specific error details explaining why the format is invalid, such as out-of-range octets or malformed segments.

Can I validate private IP addresses like 192.168.x.x?

Yes, validation checks format correctness regardless of whether the IP is public, private, reserved, or loopback.

What's the REST API format for IP validation?

Send GET request to /v1/ip/validate with the IP string as a query parameter. Returns JSON with validation status and details.

Try Validate Ip Now

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

Get Free API Key