IP Address Utilities

Ipv6 To Ipv4

Extracts IPv4 addresses from IPv6-mapped formats like ::ffff:192.168.1.1 or 2001:db8::192.0.2.1. Use via MCP in Cursor or Windsurf for network parsing tasks, or call GET /v1/ip/ipv6-to-ipv4 directly. Returns the embedded IPv4 address (192.168.1.1) or indicates if no mapping exists. Essential for dual-stack network configurations and legacy system integration.

API Endpoint

GET /v1/ip/ipv6-to-ipv4

Code Examples

curl "https://tinyfn.io/v1/ip/ipv6-to-ipv4" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/ip/ipv6-to-ipv4', {
  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/ipv6-to-ipv4',
    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

What IPv6 formats can be converted to IPv4?

Handles IPv4-mapped IPv6 (::ffff:x.x.x.x), IPv4-compatible IPv6 (::x.x.x.x), and 6to4 addresses (2002::/16). Returns the extracted IPv4 or indicates no mapping found.

How do I use this tool with MCP in my AI coding assistant?

Enable TinyFn's MCP server in Cursor or Claude Code, then ask your AI to extract IPv4 from IPv6 addresses. The tool handles validation and returns clean IPv4 results for network code.

What happens if I pass a pure IPv6 address with no IPv4 mapping?

The tool returns an error or null result indicating no embedded IPv4 address exists. It only extracts IPv4 from specific mapping formats, not arbitrary IPv6 addresses.

Does this work with compressed IPv6 notation?

Yes, handles compressed formats like ::ffff:c0a8:101 (equivalent to ::ffff:192.168.1.1). The tool expands and parses both compressed and full IPv6 representations.

Can I batch process multiple IPv6 addresses for IPv4 extraction?

The endpoint processes one address per request. For batch operations, make multiple API calls or use the MCP tool in a loop within your AI assistant workflow.

Try Ipv6 To Ipv4 Now

Get your free API key and start using Ipv6 To Ipv4 in seconds.

Get Free API Key